add a lot of initscript stuff from Fedora. This way we can copy scripts mostly one on one :)

The scripts (especially $out/etc/rc.d/init.d/functions) still need some work to eliminate hard paths...

svn path=/nixpkgs/trunk/; revision=4355
This commit is contained in:
Armijn Hemel 2005-12-12 17:03:54 +00:00
parent 47dcd9819f
commit 01b1cb166c
3 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,20 @@
source $stdenv/setup
export ROOT=$out
buildPhase() {
cd src
make
}
buildPhase=buildPhase
installPhase() {
make install
cd ..; cp -af rc.d sysconfig ppp $ROOT/etc
}
installPhase=installPhase
genericBuild

View File

@ -0,0 +1,12 @@
{stdenv, fetchurl, popt, pkgconfig, glib}:
stdenv.mkDerivation {
name = "initscripts-8.18";
builder = ./builder.sh;
src = fetchurl {
url = http://losser.labs.cs.uu.nl/~armijn/.nix/initscripts-8.18.tar.bz2;
md5 = "1b89ac4d344f1f20fe5022a198b69915";
};
buildInputs = [popt pkgconfig glib];
patches = [./initscripts-8.18.patch];
}

View File

@ -0,0 +1,49 @@
diff -ruN initscripts-8.18/src/Makefile initscripts-8.18.new/src/Makefile
--- initscripts-8.18/src/Makefile 2005-03-31 22:52:04.000000000 +0200
+++ initscripts-8.18.new/src/Makefile 2005-12-12 17:54:14.000000000 +0100
@@ -1,12 +1,13 @@
CFLAGS+=$(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE
PROGS=usernetctl doexec netreport testd usleep ipcalc initlog \
- getkey ppp-watch consoletype genhostid kmodule
+ getkey consoletype genhostid
+ #getkey ppp-watch consoletype genhostid kmodule
PPPWATCH_OBJS=ppp-watch.o shvar.o
INITLOG_OBJS=initlog.o process.o
USLEEP_OBJS=usleep.o
-mandir=/usr/share/man
+mandir=
all: $(PROGS)
@@ -14,9 +15,9 @@
rm -f $(PROGS) *.o
install:
- mkdir -p $(ROOT)/bin $(ROOT)/usr/sbin $(ROOT)$(mandir)/man{1,8} $(ROOT)/etc
+ mkdir -p $(ROOT)/bin $(ROOT)/sbin $(ROOT)/usr/sbin $(ROOT)$(mandir)/man{1,8} $(ROOT)/etc
install -m 755 doexec $(ROOT)/bin/doexec
- install -m 755 kmodule $(ROOT)/sbin/kmodule
+ #install -m 755 kmodule $(ROOT)/sbin/kmodule
install -m 755 usleep $(ROOT)/bin/usleep
install -m 4755 usernetctl $(ROOT)/usr/sbin/usernetctl
install -m 2755 netreport $(ROOT)/sbin/netreport
@@ -24,7 +25,7 @@
install -m 755 genhostid $(ROOT)/sbin/genhostid
install -m 755 initlog $(ROOT)/sbin/initlog
install -m 755 getkey $(ROOT)/sbin/getkey
- install -m 755 ppp-watch $(ROOT)/sbin/ppp-watch
+ #install -m 755 ppp-watch $(ROOT)/sbin/ppp-watch
install -m 755 consoletype $(ROOT)/sbin/consoletype
install -m 644 initlog.1 $(ROOT)$(mandir)/man1
install -m 644 genhostid.1 $(ROOT)$(mandir)/man1
@@ -32,7 +33,7 @@
install -m 644 netreport.1 $(ROOT)$(mandir)/man1
install -m 644 usleep.1 $(ROOT)$(mandir)/man1
install -m 644 usernetctl.8 $(ROOT)$(mandir)/man8
- install -m 644 ppp-watch.8 $(ROOT)$(mandir)/man8
+ #install -m 644 ppp-watch.8 $(ROOT)$(mandir)/man8
install -m 644 ipcalc.1 $(ROOT)$(mandir)/man1
install -m 644 consoletype.1 $(ROOT)$(mandir)/man1
install -m 644 initlog.conf $(ROOT)/etc