| 1 |
include VERSION |
include VERSION |
| 2 |
|
|
| 3 |
DESTDIR=$(shell pwd)/debian/fai |
DESTDIR=$(shell pwd)/debian/tmp |
| 4 |
DEB_HOST_ARCH=$(MACHTYPE) |
export DOCDIR = $(shell pwd)/debian/fai-doc/usr/share/doc/fai-doc |
|
DOCDIR=/usr/share/doc/fai |
|
| 5 |
LIBDIR = $(DESTDIR)/usr/lib/fai |
LIBDIR = $(DESTDIR)/usr/lib/fai |
| 6 |
SHAREDIR = $(DESTDIR)/usr/share/fai |
USRSBIN_SCRIPTS = make-fai-nfsroot make-fai-bootfloppy fai-setup fcopy ftar install_packages fai-chboot faimond fai-cd fai setup_harddisks faireboot |
| 7 |
SCRIPTS = rcS_fai setup_harddisks install_packages faireboot start-stop-daemon dhclient-perl dhclient-script fcopy ftar mount2dir bootsector device2grub |
|
| 8 |
SBIN_SCRIPTS = make-fai-nfsroot make-fai-bootfloppy fai-setup fcopy ftar bootsector |
USRBIN_SCRIPTS = fai-class fai-do-scripts fai-mirror fai-debconf device2grub |
| 9 |
CONFFILES= apt.conf dhclient.conf fai_modules_off pxelinux.cfg |
libfiles=$(wildcard lib/[a-z]*) # do not include CVS dir |
| 10 |
|
|
| 11 |
# files with variable KERNLEVERSION in it; this string will be substituted |
# files with variable KERNLEVERSION in it; this string will be substituted |
| 12 |
KVERSION_FILES = $(SHAREDIR)/templates/class/DEFAULT.var $(DESTDIR)/etc/fai/fai.conf |
KVERSION_FILES = $(DESTDIR)/etc/fai/make-fai-nfsroot.conf |
| 13 |
|
|
| 14 |
all: |
all: |
| 15 |
$(MAKE) -C doc all |
$(MAKE) -C doc all |
| 21 |
$(MAKE) -f debian/rules clean |
$(MAKE) -f debian/rules clean |
| 22 |
|
|
| 23 |
install: |
install: |
| 24 |
$(MAKE) -C doc install DOCDIR=$(DOCDIR) |
mkdir -p $(DESTDIR)/{sbin,man} $(DESTDIR)/etc/{fai,modutils,dhcp3,apt.conf.d} |
| 25 |
cd scripts ; install $(SBIN_SCRIPTS) $(DESTDIR)/usr/sbin |
mkdir -p $(DESTDIR)/usr/{sbin,bin} $(DESTDIR)/usr/lib/fai |
| 26 |
cd scripts ; install $(SCRIPTS) $(LIBDIR)/sbin |
install man/* $(DESTDIR)/man |
| 27 |
install -m644 lib/subroutines $(SHAREDIR) |
$(MAKE) -C doc install |
| 28 |
# potato |
-install $(libfiles) $(LIBDIR) |
| 29 |
install -m644 lib/Fai.pm $(DESTDIR)/usr/lib/perl5/Debian |
cd scripts ; install $(USRSBIN_SCRIPTS) $(DESTDIR)/usr/sbin |
| 30 |
install -m644 lib/Fai.pm $(DESTDIR)/usr/share/perl5/Debian |
cd scripts ; install $(USRBIN_SCRIPTS) $(DESTDIR)/usr/bin |
| 31 |
cd conf ; install -m644 $(CONFFILES) $(SHAREDIR)/etc/ |
install scripts/fai-start-stop-daemon $(DESTDIR)/sbin |
| 32 |
install -m644 conf/fai.conf $(DESTDIR)/etc/fai/ |
install scripts/dhclient-script $(DESTDIR)/etc/dhcp3 |
| 33 |
cp -a examples $(DESTDIR)/$(DOCDIR) |
install -m644 conf/dhclient.conf $(DESTDIR)/etc/dhcp3 |
| 34 |
cp -a utils templates $(SHAREDIR) |
install -m644 conf/apt.conf $(DESTDIR)/etc/apt.conf.d/90fai |
| 35 |
|
install -m644 conf/fai.conf conf/sources.list conf/menu.lst $(DESTDIR)/etc/fai/ |
| 36 |
|
install -m600 conf/make-fai-nfsroot.conf $(DESTDIR)/etc/fai/ |
| 37 |
|
install -m600 conf/fai_modules_off $(DESTDIR)/etc/modutils |
| 38 |
perl -pi -e 's/_KERNELVERSION_/$(KERNELVERSION)/' $(KVERSION_FILES) |
perl -pi -e 's/_KERNELVERSION_/$(KERNELVERSION)/' $(KVERSION_FILES) |
| 39 |
perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(LIBDIR)/sbin/rcS_fai |
perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(DESTDIR)/usr/sbin/fai |
| 40 |
ln -fs installimage_3com $(DESTDIR)/boot/fai/bigfoot |
cp -a examples $(DOCDIR) |
| 41 |
ln -fs installimage_3com $(DESTDIR)/boot/fai/ant01 |
cp -a utils $(DOCDIR)/examples |
|
ln -fs installimage_3com $(DESTDIR)/boot/fai/atom_install |
|
| 42 |
|
|
| 43 |
.PHONY: clean veryclean |
.PHONY: clean veryclean |