/[gentoo-x86]/sys-apps/qingy/qingy-1.0.0.ebuild
Gentoo

Contents of /sys-apps/qingy/qingy-1.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri May 4 09:17:27 2012 UTC (2 years, 2 months ago) by jdhore
Branch: MAIN
Changes since 1.4: +3 -3 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/qingy/qingy-1.0.0.ebuild,v 1.4 2011/01/11 12:25:06 xarthisius Exp $
4
5 EAPI="2"
6
7 inherit elisp-common eutils pam
8
9 GENTOO_THEME_VERSION="2.1"
10
11 DESCRIPTION="a DirectFB getty replacement"
12 HOMEPAGE="http://qingy.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
14 mirror://gentoo/${PN}-gentoo-theme-${GENTOO_THEME_VERSION}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ppc x86"
19 IUSE="crypt directfb emacs gpm opensslcrypt pam static X"
20
21 RDEPEND=">=sys-libs/ncurses-5.4-r6
22 opensslcrypt? ( >=dev-libs/openssl-0.9.7e )
23 crypt? ( >=dev-libs/libgcrypt-1.2.1 )
24 directfb? ( >=dev-libs/DirectFB-1.4.2[fbcon,jpeg,png,truetype] )
25 emacs? ( virtual/emacs )
26 pam? ( >=sys-libs/pam-0.75-r11 )
27 X? ( x11-libs/libX11
28 x11-libs/libXScrnSaver
29 x11-proto/scrnsaverproto )"
30
31 DEPEND="${RDEPEND}
32 virtual/pkgconfig
33 >=sys-apps/sed-4.1.4-r1"
34 RDEPEND="${RDEPEND}
35 pam? ( sys-auth/pambase )"
36
37 SITEFILE=50${PN}-gentoo.el
38
39 src_configure()
40 {
41 local crypto_support="--disable-crypto"
42 local emacs_support="--disable-emacs --without-lispdir"
43
44 if use crypt && use opensslcrypt; then
45 echo
46 ewarn "You can have openssl or libgcrypt as a crypto library, not both."
47 ewarn "Using libgcrypt now..."
48 echo
49 fi
50
51 use emacs && emacs_support="--enable-emacs --with-lispdir=${SITELISP}/${PN}"
52 use opensslcrypt && crypto_support="--enable-crypto=openssl"
53 use crypt && crypto_support="--enable-crypto=libgcrypt"
54 econf \
55 --sbindir=/sbin \
56 --disable-optimizations \
57 `use_enable pam` \
58 `use_enable static static-build` \
59 `use_enable gpm gpm-lock` \
60 `use_enable X x-support` \
61 `use_enable directfb DirectFB-support` \
62 ${crypto_support} \
63 ${emacs_support} \
64 || die "Configuration failed"
65 }
66
67 src_install()
68 {
69 # Copy documentation manually as make install only installs info files
70 # INSTALL is left because it contains also configuration informations
71 dodoc AUTHORS ChangeLog INSTALL NEWS README THANKS TODO
72
73 # Install the program
74 emake DESTDIR="${D}" install || die "Installation failed"
75
76 # Set the settings file umask to 600, in case somebody
77 # wants to make use of the autologin feature
78 /bin/chmod 600 "${D}/etc/qingy/settings"
79
80 # Install Gentoo theme
81 dodir /usr/share/${PN}/themes/gentoo
82 cp "${WORKDIR}"/gentoo/* "${D}/usr/share/${PN}/themes/gentoo" \
83 || die "Gentoo theme installation failed"
84
85 # Alter config file so that it uses our theme
86 sed -i 's/theme = "default"/theme = "gentoo"/' "${D}/etc/${PN}/settings"
87
88 # Install log rotation policy
89 insinto /etc/logrotate.d
90 newins "${FILESDIR}/${PN}-logrotate" ${PN} || die "Log rotation policy installation failed"
91
92 use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}"
93
94 rm "${D}/etc/pam.d/qingy"
95 pamd_mimic system-local-login qingy auth account password session
96 }
97
98 pkg_postinst()
99 {
100 einfo "In order to use qingy you must first edit your /etc/inittab"
101 einfo "Check the documentation at ${HOMEPAGE}"
102 einfo "for instructions on how to do that."
103 echo
104 einfo "Also, make sure to adjust qingy settings file (/etc/qingy/settings)"
105 einfo "to your preferences/machine configuration..."
106
107 if use crypt; then
108 echo
109 einfo "You will have to create a key pair using 'qingy-keygen'"
110 echo
111 ewarn "Note that sometimes a generated key-pair may pass the internal tests"
112 ewarn "but fail to work properly. You will get a 'regenerate your keys'"
113 ewarn "message. If this is your case, please remove /etc/qingy/public_key"
114 ewarn "and /etc/qingy/private_key and run qingy-keygen again..."
115 fi
116
117 use emacs && echo && elisp-site-regen
118 }
119
120 pkg_postrm() {
121 use emacs && elisp-site-regen
122 }

  ViewVC Help
Powered by ViewVC 1.1.20