/[gentoo-x86]/app-admin/packagekit-base/packagekit-base-0.6.22.ebuild
Gentoo

Contents of /app-admin/packagekit-base/packagekit-base-0.6.22.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Dec 31 18:23:37 2012 UTC (5 months, 2 weeks ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Add ~ia64, wrt bug #387959

(Portage version: 2.1.11.31/cvs/Linux ia64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-admin/packagekit-base/packagekit-base-0.6.22.ebuild,v 1.4 2012/12/02 22:50:49 ssuominen Exp $
4
5 EAPI="3"
6
7 # 0.6.x doesn't work with Python 3.x
8 PYTHON_DEPEND="2"
9
10 inherit eutils multilib python nsplugins bash-completion-r1
11
12 MY_PN="PackageKit"
13 MY_P=${MY_PN}-${PV}
14
15 DESCRIPTION="Manage packages in a secure way using a cross-distro and cross-architecture API"
16 HOMEPAGE="http://www.packagekit.org/"
17 SRC_URI="http://www.packagekit.org/releases/${MY_P}.tar.xz"
18
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~x86"
22 IUSE="connman cron doc +introspection networkmanager nsplugin pm-utils +policykit entropy static-libs test udev"
23
24 CDEPEND="connman? ( net-misc/connman )
25 introspection? ( >=dev-libs/gobject-introspection-0.9.8 )
26 networkmanager? ( >=net-misc/networkmanager-0.6.4 )
27 nsplugin? (
28 dev-libs/nspr
29 x11-libs/cairo
30 >=x11-libs/gtk+-2.14.0:2
31 x11-libs/pango
32 )
33 policykit? ( >=sys-auth/polkit-0.94 )
34 udev? ( virtual/udev[gudev] )
35 dev-db/sqlite:3
36 >=dev-libs/dbus-glib-0.74
37 >=dev-libs/glib-2.16.1:2
38 >=sys-apps/dbus-1.3.0"
39 DEPEND="${CDEPEND}
40 doc? ( dev-util/gtk-doc )
41 nsplugin? ( <net-misc/npapi-sdk-0.27.1 )
42 dev-libs/libxslt
43 >=dev-util/intltool-0.35.0
44 virtual/pkgconfig
45 sys-devel/gettext"
46
47 RDEPEND="${CDEPEND}
48 entropy? ( >=sys-apps/entropy-1.0_rc27 )
49 pm-utils? ( sys-power/pm-utils )
50 >=app-portage/layman-1.2.3
51 >=sys-apps/portage-2.1.9
52 sys-auth/consolekit"
53
54 APP_LINGUAS="as bg bn ca cs da de el en_GB es fi fr gu he hi hu it ja kn ko ml mr
55 ms nb nl or pa pl pt pt_BR ro ru sk sr sr@latin sv ta te th tr uk zh_CN zh_TW"
56 for X in ${APP_LINGUAS}; do
57 IUSE=" ${IUSE} linguas_${X}"
58 done
59
60 S="${WORKDIR}/${MY_P}"
61 RESTRICT="test" # tests are failing atm
62
63 # NOTES:
64 # do not use a specific user, useless and not more secure according to upstream
65 # doc is in the tarball and always installed
66 # mono doesn't install anything (RDEPEND dev-dotnet/gtk-sharp-gapi:2
67 # (R)DEPEND dev-dotnet/glib-sharp:2 dev-lang/mono), upstream bug 23247
68 # >=npapi-sdk-0.27.1 has slightly changed API, once it is unmasked in tree
69 # drop the npapi-api-change patch below and relax the dependency constraints
70
71 # UPSTREAM:
72 # documentation/website with --enable-doc-install
73 # failing tests
74
75 src_prepare() {
76 epatch "${FILESDIR}"/${PN}-0.6.22-npapi-sdk.patch #383141
77 epatch "${FILESDIR}"/${PN}-0.7.x-npapi-api-change.patch #416711
78 }
79
80 src_configure() {
81 local myconf=""
82
83 if use policykit; then
84 myconf+=" --with-security-framework=polkit"
85 else
86 myconf+=" --with-security-framework=dummy"
87 fi
88
89 if [[ -z "${LINGUAS}" ]]; then
90 myconf+=" --disable-nls"
91 else
92 myconf+=" --enable-nls"
93 fi
94
95 # localstatedir: for gentoo it's /var/lib but for $PN it's /var
96 # dep-tracking,option-check,libtool-lock,strict,local: obvious reasons
97 # command,debuginfo,gstreamer,service-packs: not supported by backend
98
99 # NOTE: default backend is autodetected at runtime, also
100 if use entropy; then
101 myconf+=" --with-default-backend=entropy"
102 else
103 myconf+=" --with-default-backend=portage"
104 fi
105 econf \
106 ${myconf} \
107 --enable-introspection=no \
108 --localstatedir=/var \
109 --disable-dependency-tracking \
110 --enable-option-checking \
111 --enable-libtool-lock \
112 --disable-strict \
113 --disable-local \
114 $(use_enable doc gtk-doc) \
115 $(use_enable bash-completion command-not-found) \
116 --disable-debuginfo-install \
117 --disable-gstreamer-plugin \
118 --disable-service-packs \
119 --enable-man-pages \
120 --enable-portage \
121 $(use_enable entropy) \
122 $(use_enable cron) \
123 --disable-gtk-module \
124 $(use_enable introspection) \
125 $(use_enable networkmanager) \
126 $(use_enable connman) \
127 $(use_enable nsplugin browser-plugin) \
128 $(use_enable pm-utils) \
129 --disable-qt \
130 $(use_enable static-libs static) \
131 $(use_enable test tests) \
132 $(use_enable udev device-rebind)
133 }
134
135 src_install() {
136 emake DESTDIR="${D}" install || die "emake install failed"
137
138 dodoc AUTHORS MAINTAINERS NEWS README TODO || die "dodoc failed"
139 dodoc ChangeLog || die "dodoc failed"
140
141 if use nsplugin; then
142 dodir "/usr/$(get_libdir)/${PLUGINS_DIR}"
143 mv "${D}"/usr/$(get_libdir)/mozilla/plugins/* \
144 "${D}/usr/$(get_libdir)/${PLUGINS_DIR}/"
145 fi
146
147 if ! use static-libs; then
148 find "${D}" -name *.la | xargs rm || die "removing .la files failed"
149 fi
150
151 # Remove precompiled python modules, we handle byte compiling
152 rm -f "${D}/$(python_get_sitedir)"/${PN}*.py[co]
153
154 newbashcomp "${S}/contrib/pk-completion.bash" ${PN}
155 # Remove bashcomp file installed by build-system
156 rm -f "${D}/bash_completion.d/pk-completion.bash"
157
158 # Remove unwanted PackageKit website stuff
159 rm -rf "${D}/usr/share/PackageKit/website"
160
161 }
162
163 pkg_postinst() {
164 python_mod_optimize ${PN/-base}
165
166 if ! use policykit; then
167 ewarn "You are not using policykit, the daemon can't be considered as secure."
168 ewarn "All users will be able to do anything through ${MY_PN}."
169 ewarn "Please, consider rebuilding ${MY_PN} with policykit USE flag."
170 ewarn "THIS IS A SECURITY ISSUE."
171 echo
172 ebeep
173 epause 5
174 fi
175 bash-completion_pkg_postinst
176 }
177
178 pkg_prerm() {
179 einfo "Removing downloaded files with ${MY_PN}..."
180 [[ -d "${ROOT}"/var/cache/${MY_PN}/downloads/ ]] && \
181 rm -rf /var/cache/PackageKit/downloads/*
182 }
183
184 pkg_postrm() {
185 python_mod_cleanup ${PN/-base}
186 }

  ViewVC Help
Powered by ViewVC 1.1.20