source: trunk/scripts/samhain.ebuild-light.in@ 225

Last change on this file since 225 was 1, checked in by katerina, 19 years ago

Initial import

File size: 2.5 KB
Line 
1# Copyright 2004 Rainer Wichmann
2# Distributed under the terms of the GNU General Public License v2
3
4inherit eutils
5
6MY_P="${PN}_signed-${PV}"
7SLOT="0"
8LICENSE="GPL-2"
9DESCRIPTION="Samhain is a file integrity checker with optional central logging"
10
11# This is a fake URI that allows us to do a 'make dist' and copy
12# the file to distdir.
13# The proper URI would be http://www.la-samhna.de/archive/${MY_P}.tar.gz,
14# but this would force us to do a 'make dist-sign' ...
15# Apparently, portage cannot handle the file:// scheme,
16# and not every user might be prepared to create a signed tarball.
17#
18# SRC_URI="http://www.la-samhna.de/archive/${MY_P}.tar.gz"
19SRC_URI="http://www.la-samhna.de/archive/${P}.tar.gz"
20
21
22HOMEPAGE="http://www.la-samhna.de/samhain/"
23
24KEYWORDS="x86"
25
26IUSE=""
27
28DEPEND="app-arch/gzip
29 app-arch/tar"
30# mysql? (>=dev-db/mysql-3.23.58)"
31RDEPEND=""
32
33src_unpack() {
34 unpack ${A}
35 cd ${WORKDIR}
36 if test -f ${P}.tar.gz; then
37 gunzip -c ${P}.tar.gz | tar xf - || die
38 cd ${P}
39 elif test -d "samhain-${PV}"; then
40 mv "samhain-${PV}" "@install_name@-${PV}"
41 fi
42}
43
44src_compile() {
45 local myconf="--with-trusted=0,250"
46
47# myconf="$myconf --enable-mounts-check"
48# myconf="$myconf --enable-userfiles"
49
50# use mysql && myconf="$myconf --with-database=mysql"
51# use postgres && myconf="$myconf --with-database=postgresql"
52
53# econf \
54# --with-pid-file=/var/run/${PN}.pid \
55# --with-state-dir=/var/lib/${PN} \
56# --with-log-file=/var/log/${PN}.log \
57
58 ./configure ${myconf} @mydefargs@ || die
59 emake || die
60
61 echo '#!/bin/sh' > ./sstrip
62 echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip
63}
64
65src_install() {
66 make DESTDIR=${D} install-light || die
67 make DESTDIR=${D} install-boot || die
68
69 rm -f ${D}/@sbindir@/@install_name@_stealth
70}
71
72pkg_prerm() {
73 rc-update del @install_name@
74 einfo "Stopping service @install_name@"
75 test -f /etc/init.d/@install_name@ && /etc/init.d/@install_name@ stop
76 sleep 3
77}
78
79pkg_postinst() {
80 rc-update add @install_name@ default
81 einfo
82 einfo "@install_name@ is installed but is NOT running yet, and the database"
83 einfo "of file signatures is NOT initialized yet."
84 einfo
85 einfo "You need to run \"@install_name@ -t init\" to initialize "
86 einfo "the baseline database of file signatures."
87 einfo
88 einfo "After initializing the database, you can start @install_name@"
89 einfo "with \"/etc/init.d/@install_name@ start\". It is configured to start"
90 einfo "automatically on the next boot for runlevel \"default\""
91}
92
Note: See TracBrowser for help on using the repository browser.