Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/calibre: calibre-0.6.20.ebuild ChangeLog
Date: Sat, 31 Oct 2009 05:09:50
Message-Id: E1N46Dj-0007rF-Na@stork.gentoo.org
1 zmedico 09/10/31 05:09:47
2
3 Modified: ChangeLog
4 Added: calibre-0.6.20.ebuild
5 Log:
6 0.6.20 version bump.
7 (Portage version: 2.2_rc47/cvs/Linux i686)
8
9 Revision Changes Path
10 1.57 app-text/calibre/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?rev=1.57&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?rev=1.57&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?r1=1.56&r2=1.57
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
19 retrieving revision 1.56
20 retrieving revision 1.57
21 diff -u -r1.56 -r1.57
22 --- ChangeLog 23 Oct 2009 03:04:31 -0000 1.56
23 +++ ChangeLog 31 Oct 2009 05:09:47 -0000 1.57
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-text/calibre
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.56 2009/10/23 03:04:31 zmedico Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.57 2009/10/31 05:09:47 zmedico Exp $
29 +
30 +*calibre-0.6.20 (31 Oct 2009)
31 +
32 + 31 Oct 2009; Zac Medico <zmedico@g.o> +calibre-0.6.20.ebuild:
33 + 0.6.20 version bump.
34
35 *calibre-0.6.19 (23 Oct 2009)
36
37
38
39
40 1.1 app-text/calibre/calibre-0.6.20.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/calibre-0.6.20.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/calibre-0.6.20.ebuild?rev=1.1&content-type=text/plain
44
45 Index: calibre-0.6.20.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.6.20.ebuild,v 1.1 2009/10/31 05:09:47 zmedico Exp $
50
51 EAPI=2
52 NEED_PYTHON=2.6
53
54 inherit python distutils eutils fdo-mime bash-completion
55
56 DESCRIPTION="Ebook management application."
57 HOMEPAGE="http://calibre.kovidgoyal.net"
58 SRC_URI="http://calibre.kovidgoyal.net/downloads/$P.tar.gz"
59
60 LICENSE="GPL-2"
61
62 KEYWORDS="~amd64 ~x86"
63
64 SLOT="0"
65
66 IUSE=""
67
68 # libusb-compat is untested
69 SHARED_DEPEND=">=dev-lang/python-2.6[sqlite]
70 >=dev-python/setuptools-0.6_rc5
71 >=dev-python/imaging-1.1.6
72 >=dev-libs/libusb-0.1.12:0
73 >=dev-python/PyQt4-4.5[X,svg,webkit]
74 >=dev-python/mechanize-0.1.11
75 >=media-gfx/imagemagick-6.3.5
76 >=x11-misc/xdg-utils-1.0.2
77 >=dev-python/dbus-python-0.82.2
78 >=dev-python/lxml-2.1.5
79 >=dev-python/python-dateutil-1.4.1
80 >=dev-python/beautifulsoup-3.0.5
81 >=dev-python/dnspython-1.6.0
82 >=virtual/poppler-0.12.0
83 >=sys-apps/help2man-1.36.4
84 app-text/podofo"
85
86 RDEPEND="$SHARED_DEPEND
87 >=dev-python/reportlab-2.1"
88
89 DEPEND="$SHARED_DEPEND
90 dev-python/setuptools
91 >=gnome-base/librsvg-2.0.0
92 >=x11-misc/xdg-utils-1.0.2-r2
93 sys-apps/help2man"
94
95 S=$WORKDIR/$PN
96
97 src_prepare() {
98 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
99 # calls xdg-* (bug #258938).
100 sed -e "s:'xdg-desktop-menu', 'install':'xdg-desktop-menu', 'install', '--mode', 'user':" \
101 -e "s:xdg-icon-resource install:xdg-icon-resource install --mode user:" \
102 -e "s:xdg-mime install:xdg-mime install --mode user:" \
103 -e "s:old_udev = '/etc:old_udev = '${D}etc:" \
104 -i src/calibre/linux.py || die "sed'ing in the IMAGE path failed"
105
106 # Disable unnecessary privilege dropping for bug #287067.
107 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
108 -i setup/install.py || die "sed'ing in the IMAGE path failed"
109
110 distutils_src_prepare
111 }
112
113 src_install() {
114
115 # Bypass kbuildsycoca and update-mime-database in order to
116 # avoid sandbox violations if xdg-mime tries to call them.
117 cat - > "${T}/kbuildsycoca" <<-EOF
118 #!$BASH
119 exit 0
120 EOF
121
122 cp "${T}"/{kbuildsycoca,update-mime-database}
123 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
124
125 # --bindir and --sharedir don't seem to work.
126 # Pass them in anyway so we'll know when they are fixed.
127 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
128 # violation with kbuildsycoca as in bug #287067, comment #13.
129 export -n DISPLAY
130 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
131 distutils_src_install --bindir="${D}usr/bin" --sharedir="${D}usr/share"
132
133 grep -rlZ "${D}" "${D}" | xargs -0 sed -e "s:${D}:/:g" -i ||
134 die "failed to fix harcoded \$D in paths"
135
136 # Python modules are no longer installed in
137 # site-packages, so remove empty dirs.
138 find "${D}$(python_get_libdir)" -type d -empty -delete
139
140 # This code may fail if behavior of --root, --bindir or
141 # --sharedir changes in the future.
142 dodir /usr/lib
143 mv "${D}lib/calibre" "${D}usr/lib/" ||
144 die "failed to move lib dir"
145 find "${D}"lib -type d -empty -delete
146
147 dodir /usr/bin
148 mv "${D}bin/"* "${D}usr/bin/" ||
149 die "failed to move bin dir"
150 find "${D}"bin -type d -empty -delete
151
152 dodir /usr/share
153 mv "${D}share/"* "${D}usr/share/" ||
154 die "failed to move share dir"
155 find "${D}"share -type d -empty -delete
156
157 # The menu entries end up here due to '--mode user' being added to
158 # xdg-* options in src_prepare.
159 dodir /usr/share/mime/packages
160 chmod -fR a+rX,u+w,g-w,o-w "$HOME"/.local
161 mv "$HOME"/.local/share/mime/packages/* "$D"usr/share/mime/packages/ ||
162 die "failed to register mime types"
163 dodir /usr/share/icons
164 mv "$HOME"/.local/share/icons/* "$D"usr/share/icons/ ||
165 die "failed to install icon files"
166 domenu "$HOME"/.local/share/applications/*.desktop ||
167 die "failed to install .desktop menu files"
168
169 dobashcompletion "$D"etc/bash_completion.d/calibre
170 rm -r "${D}"etc/bash_completion.d
171 find "${D}"etc -type d -empty -delete
172 }
173
174 pkg_postinst() {
175 fdo-mime_desktop_database_update
176 fdo-mime_mime_database_update
177 distutils_pkg_postinst
178 bash-completion_pkg_postinst
179 }