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: ChangeLog calibre-0.6.31.ebuild
Date: Tue, 29 Dec 2009 07:24:36
Message-Id: E1NPWRT-0005Oo-Ib@stork.gentoo.org
1 zmedico 09/12/29 07:24:31
2
3 Modified: ChangeLog
4 Added: calibre-0.6.31.ebuild
5 Log:
6 0.6.31 version bump.
7 (Portage version: 2.2_rc61/cvs/Linux i686)
8
9 Revision Changes Path
10 1.68 app-text/calibre/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?rev=1.68&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?rev=1.68&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/ChangeLog?r1=1.67&r2=1.68
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
19 retrieving revision 1.67
20 retrieving revision 1.68
21 diff -u -r1.67 -r1.68
22 --- ChangeLog 23 Dec 2009 10:15:18 -0000 1.67
23 +++ ChangeLog 29 Dec 2009 07:24:31 -0000 1.68
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.67 2009/12/23 10:15:18 zmedico Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.68 2009/12/29 07:24:31 zmedico Exp $
29 +
30 +*calibre-0.6.31 (29 Dec 2009)
31 +
32 + 29 Dec 2009; Zac Medico <zmedico@g.o> +calibre-0.6.31.ebuild:
33 + 0.6.31 version bump.
34
35 *calibre-0.6.29 (23 Dec 2009)
36
37
38
39
40 1.1 app-text/calibre/calibre-0.6.31.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/calibre-0.6.31.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/calibre/calibre-0.6.31.ebuild?rev=1.1&content-type=text/plain
44
45 Index: calibre-0.6.31.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.31.ebuild,v 1.1 2009/12/29 07:24:31 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-ebook.com/"
58 SRC_URI="http://calibre-ebook.com/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
131 # Bug #295672 - Aavoid sandbox violation in ~/.config by forcing
132 # variables to point to our fake temporary $HOME.
133 export XDG_CONFIG_HOME="$HOME/.config"
134 export CALIBRE_CONFIG_DIRECTORY="$XDG_CONFIG_HOME/calibre"
135 mkdir -p "$XDG_CONFIG_HOME" "$CALIBRE_CONFIG_DIRECTORY"
136
137 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
138 distutils_src_install --bindir="${D}usr/bin" --sharedir="${D}usr/share"
139
140 grep -rlZ "${D}" "${D}" | xargs -0 sed -e "s:${D}:/:g" -i ||
141 die "failed to fix harcoded \$D in paths"
142
143 # Python modules are no longer installed in
144 # site-packages, so remove empty dirs.
145 find "${D}$(python_get_libdir)" -type d -empty -delete
146
147 # This code may fail if behavior of --root, --bindir or
148 # --sharedir changes in the future.
149 dodir /usr/lib
150 mv "${D}lib/calibre" "${D}usr/lib/" ||
151 die "failed to move lib dir"
152 find "${D}"lib -type d -empty -delete
153
154 dodir /usr/bin
155 mv "${D}bin/"* "${D}usr/bin/" ||
156 die "failed to move bin dir"
157 find "${D}"bin -type d -empty -delete
158
159 dodir /usr/share
160 mv "${D}share/"* "${D}usr/share/" ||
161 die "failed to move share dir"
162 find "${D}"share -type d -empty -delete
163
164 # The menu entries end up here due to '--mode user' being added to
165 # xdg-* options in src_prepare.
166 dodir /usr/share/mime/packages
167 chmod -fR a+rX,u+w,g-w,o-w "$HOME"/.local
168 mv "$HOME"/.local/share/mime/packages/* "$D"usr/share/mime/packages/ ||
169 die "failed to register mime types"
170 dodir /usr/share/icons
171 mv "$HOME"/.local/share/icons/* "$D"usr/share/icons/ ||
172 die "failed to install icon files"
173 domenu "$HOME"/.local/share/applications/*.desktop ||
174 die "failed to install .desktop menu files"
175
176 dobashcompletion "$D"etc/bash_completion.d/calibre
177 rm -r "${D}"etc/bash_completion.d
178 find "${D}"etc -type d -empty -delete
179 }
180
181 pkg_postinst() {
182 fdo-mime_desktop_database_update
183 fdo-mime_mime_database_update
184 distutils_pkg_postinst
185 bash-completion_pkg_postinst
186 }