summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-19 13:56:54 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-19 13:56:54 +0000
commit0f248c3c49498497230274da6dd58662669e4da6 (patch)
tree45b1e8cb4724be0170a79288f1e4bb5b1040ab4b /dev-libs/openct
parentversion bump (diff)
downloadhistorical-0f248c3c49498497230274da6dd58662669e4da6.tar.gz
historical-0f248c3c49498497230274da6dd58662669e4da6.tar.bz2
historical-0f248c3c49498497230274da6dd58662669e4da6.zip
Update init script to use checkpath instead of using keepdir in the ebuild; add an udev USE flag to not install the rules; use EAPI=4; use append-cppflags for -DDEBUG_IFDH.
Package-Manager: portage-2.2.0_alpha110/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/openct')
-rw-r--r--dev-libs/openct/ChangeLog10
-rw-r--r--dev-libs/openct/files/openct.rc.232
-rw-r--r--dev-libs/openct/metadata.xml4
-rw-r--r--dev-libs/openct/openct-0.6.20-r2.ebuild (renamed from dev-libs/openct/openct-0.6.20-r1.ebuild)29
4 files changed, 62 insertions, 13 deletions
diff --git a/dev-libs/openct/ChangeLog b/dev-libs/openct/ChangeLog
index 7773e1bc5f3f..eaa7a91c1535 100644
--- a/dev-libs/openct/ChangeLog
+++ b/dev-libs/openct/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/openct
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/openct/ChangeLog,v 1.97 2012/06/06 03:45:11 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openct/ChangeLog,v 1.98 2012/06/19 13:56:54 flameeyes Exp $
+
+*openct-0.6.20-r2 (19 Jun 2012)
+
+ 19 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/openct.rc.2,
+ +openct-0.6.20-r2.ebuild, -openct-0.6.20-r1.ebuild, metadata.xml:
+ Update init script to use checkpath instead of using keepdir in the ebuild;
+ add an udev USE flag to not install the rules; use EAPI=4; use append-cppflags
+ for -DDEBUG_IFDH.
06 Jun 2012; Zac Medico <zmedico@gentoo.org> openct-0.6.20-r1.ebuild,
openct-0.6.20.ebuild:
diff --git a/dev-libs/openct/files/openct.rc.2 b/dev-libs/openct/files/openct.rc.2
new file mode 100644
index 000000000000..467ad3b36e2d
--- /dev/null
+++ b/dev-libs/openct/files/openct.rc.2
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openct/files/openct.rc.2,v 1.1 2012/06/19 13:56:54 flameeyes Exp $
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /etc/openct.conf ] ; then
+ eerror "You need an /etc/openct.conf file to run OpenCT"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ checkpath -d -m 0750 -o openctd:openct /var/run/openct
+
+ ebegin "Starting OpenCT"
+ /usr/sbin/openct-control init
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenCT"
+ /usr/sbin/openct-control shutdown
+ eend $?
+}
diff --git a/dev-libs/openct/metadata.xml b/dev-libs/openct/metadata.xml
index 6041a4f09f82..6d4ecca574e2 100644
--- a/dev-libs/openct/metadata.xml
+++ b/dev-libs/openct/metadata.xml
@@ -11,5 +11,9 @@
<flag name="debug">
Add debug output to the driver library for pcsc-lite.
</flag>
+
+ <flag name="udev">
+ Install rules for <pkg>sys-fs/udev</pkg> to auto-start openct.
+ </flag>
</use>
</pkgmetadata>
diff --git a/dev-libs/openct/openct-0.6.20-r1.ebuild b/dev-libs/openct/openct-0.6.20-r2.ebuild
index 5ff7088eaccf..1c1a00199335 100644
--- a/dev-libs/openct/openct-0.6.20-r1.ebuild
+++ b/dev-libs/openct/openct-0.6.20-r2.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/openct/openct-0.6.20-r1.ebuild,v 1.5 2012/06/06 03:45:11 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openct/openct-0.6.20-r2.ebuild,v 1.1 2012/06/19 13:56:54 flameeyes Exp $
-EAPI="2"
+EAPI=4
inherit eutils flag-o-matic multilib user
@@ -14,24 +14,30 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~spar
LICENSE="LGPL-2.1"
SLOT="0"
-IUSE="doc pcsc-lite usb debug"
+IUSE="doc pcsc-lite usb debug +udev"
# libtool is required at runtime for libltdl
RDEPEND="pcsc-lite? ( >=sys-apps/pcsc-lite-1.7.2-r1 )
usb? ( virtual/libusb:0 )
- >=sys-fs/udev-096
sys-devel/libtool"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )"
+# udev is not required at all at build-time as it's only a matter of
+# installing the rules; add openrc for the checkpath used in the new
+# init script
+RDEPEND="${RDEPEND}
+ udev? ( >=sys-fs/udev-096 )
+ sys-apps/openrc"
+
pkg_setup() {
enewgroup openct
enewuser openctd
}
src_configure() {
- use debug && append-flags -DDEBUG_IFDH
+ use debug && append-cppflags -DDEBUG_IFDH
econf \
--docdir="/usr/share/doc/${PF}" \
@@ -50,17 +56,16 @@ src_configure() {
}
src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
+ emake DESTDIR="${D}" install
find "${D}" -name '*.la' -delete
rm "${D}"/usr/$(get_libdir)/openct-ifd.*
- insinto /lib/udev/rules.d/
- newins etc/openct.udev 70-openct.rules || die "newins 70-openct.rules failed"
-
- diropts -m0750 -gopenct -oopenctd
- keepdir /var/run/openct
+ if use udev; then
+ insinto /lib/udev/rules.d/
+ newins etc/openct.udev 70-openct.rules
+ fi
- newinitd "${FILESDIR}"/openct.rc openct
+ newinitd "${FILESDIR}"/openct.rc.2 openct
}
pkg_postinst() {