| 1 |
include VERSION
|
| 2 |
|
| 3 |
DESTDIR=$(shell pwd)/debian/tmp
|
| 4 |
export DOCDIR = $(shell pwd)/debian/fai-doc/usr/share/doc/fai-doc
|
| 5 |
LIBDIR = $(DESTDIR)/usr/lib/fai
|
| 6 |
USRSBIN_SCRIPTS = make-fai-nfsroot make-fai-bootfloppy fai-setup fcopy ftar install_packages fai-chboot faimond fai-cd fai setup_harddisks faireboot
|
| 7 |
|
| 8 |
USRBIN_SCRIPTS = fai-class fai-do-scripts fai-mirror fai-debconf device2grub
|
| 9 |
libfiles=$(wildcard lib/[a-z]*) # do not include CVS dir
|
| 10 |
|
| 11 |
# files with variable KERNLEVERSION in it; this string will be substituted
|
| 12 |
KVERSION_FILES = $(DESTDIR)/etc/fai/make-fai-nfsroot.conf
|
| 13 |
|
| 14 |
all:
|
| 15 |
$(MAKE) -C doc all
|
| 16 |
|
| 17 |
clean:
|
| 18 |
find -name svn-commit.tmp -o -name svn-commit.tmp~ | xargs -r rm
|
| 19 |
$(MAKE) -C doc clean
|
| 20 |
|
| 21 |
veryclean: clean
|
| 22 |
$(MAKE) -f debian/rules clean
|
| 23 |
|
| 24 |
install:
|
| 25 |
mkdir -p $(DESTDIR)/{sbin,man} $(DESTDIR)/etc/{fai,modutils,dhcp3,apt.conf.d}
|
| 26 |
mkdir -p $(DESTDIR)/usr/{sbin,bin} $(DESTDIR)/usr/lib/fai
|
| 27 |
install man/* $(DESTDIR)/man
|
| 28 |
$(MAKE) -C doc install
|
| 29 |
-install $(libfiles) $(LIBDIR)
|
| 30 |
cd bin ; install $(USRSBIN_SCRIPTS) $(DESTDIR)/usr/sbin
|
| 31 |
cd bin ; install $(USRBIN_SCRIPTS) $(DESTDIR)/usr/bin
|
| 32 |
install bin/fai-start-stop-daemon $(DESTDIR)/sbin
|
| 33 |
install bin/dhclient-script $(DESTDIR)/etc/dhcp3
|
| 34 |
install -m644 conf/dhclient.conf $(DESTDIR)/etc/dhcp3
|
| 35 |
install -m644 conf/apt.conf $(DESTDIR)/etc/apt/apt.conf.d/90fai
|
| 36 |
install -m644 conf/fai.conf conf/sources.list conf/menu.lst $(DESTDIR)/etc/fai/
|
| 37 |
install -m644 conf/make-fai-nfsroot.conf $(DESTDIR)/etc/fai/
|
| 38 |
install -m600 conf/fai_modules_off $(DESTDIR)/etc/modutils
|
| 39 |
perl -pi -e 's/_KERNELVERSION_/$(KERNELVERSION)/' $(KVERSION_FILES)
|
| 40 |
perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(DESTDIR)/usr/sbin/fai
|
| 41 |
cp -a examples $(DOCDIR)
|
| 42 |
cp -a utils $(DOCDIR)/examples
|
| 43 |
|
| 44 |
.PHONY: clean veryclean
|