blob: 0b37573e56f1d1338baa771b970b5533de0d9ae3 [file] [log] [blame] [raw]
#!/usr/bin/make -f
# -*-makefile-*-
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package:=grub
INSTALL = install -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_PROGRAM = $(INSTALL) -m 755
build:
$(checkdir)
./configure --prefix=/usr
make
echo timestamp > build
clean:
$(checkdir)
-rm -f build
-make distclean
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core debian/substvars conftestdir
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
## make dirs
install -d debian/tmp debian/tmp/usr/doc/grub debian/tmp/DEBIAN
## install files
dir=`cd debian/tmp && pwd` && make install DESTDIR=$$dir
gzip -f9 debian/tmp/usr/info/*
$(INSTALL_DATA) TODO debian/tmp/usr/doc/grub/
$(INSTALL_DATA) BUGS debian/tmp/usr/doc/grub/
$(INSTALL_DATA) NEWS debian/tmp/usr/doc/grub/
$(INSTALL_DATA) ChangeLog debian/tmp/usr/doc/grub/changelog
gzip -f9 debian/tmp/usr/doc/grub/changelog
$(INSTALL_DATA) debian/changelog debian/tmp/usr/doc/grub/changelog.Debian
gzip -f9 debian/tmp/usr/doc/grub/changelog.Debian
$(INSTALL_DATA) debian/copyright debian/tmp/usr/doc/grub/
$(INSTALL_DATA) debian/README.debian debian/tmp/usr/doc/grub/
# Install control files.
$(INSTALL_PROGRAM) debian/postinst debian/prerm debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/sbin/grub
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f debian/rules -a -f stage2/fsys_ext2fs.c
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot