Files
findutils/debian/rules

107 lines
3.2 KiB
Makefile
Executable File

#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
# Copyright 1996 by Kevin Dalley
#
CC = gcc
CFLAGS = -O2
INSTALL_TARGET=install
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_TARGET = install-strip
endif
package = findutils
build:
$(checkdir)
./configure --prefix=/usr --localstatedir=/var/lib/locate \
--libexecdir='$${prefix}/lib/locate' \
--mandir='$${prefix}/share/man' \
--infodir='$${prefix}/share/info'
$(MAKE) \
CC="$(CC)" CFLAGS="$(CFLAGS)"
cd doc ; makeinfo find.texi
touch build
clean:
$(checkdir)
-rm -f build
-$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
-rm -rf *~ debian/tmp debian/*~ debian/files*
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
install -d debian/tmp debian/tmp/DEBIAN
install -d debian/tmp/usr/share/doc/$(package)
install -d debian/tmp/usr/bin
install -d debian/tmp/usr/lib
install -d debian/tmp/usr/lib/locate
install -d debian/tmp/etc
install -d debian/tmp/etc/cron.daily
install -d debian/tmp/var
install -d debian/tmp/var/lib
install -d debian/tmp/var/lib/locate
install debian/postinst debian/prerm debian/preinst debian/tmp/DEBIAN/.
install -m 0644 debian/conffiles debian/tmp/DEBIAN/.
install debian/cron.find debian/tmp/etc/cron.daily/find
install -m 0644 debian/updatedb.conf debian/tmp/etc/updatedb.conf
$(MAKE) DESTDIR=`pwd`/debian/tmp \
CC="$(CC)" CFLAGS="$(CFLAGS)" \
INSTALL_STRIP_PROGRAM="/usr/bin/install -s" \
$(INSTALL_TARGET)
install -d debian/tmp/usr/share/doc-base
install -m 0644 debian/doc-base \
debian/tmp/usr/share/doc-base/findutils
gzip -9v debian/tmp/usr/share/info/*
gzip -9v debian/tmp/usr/share/man/man[15]/*
install -m 0644 debian/copyright debian/tmp/usr/share/doc/$(package)/.
install -m 0644 debian/changelog \
debian/tmp/usr/share/doc/$(package)/changelog.Debian
gzip -9v debian/tmp/usr/share/doc/$(package)/changelog.Debian
for file in ChangeLog NEWS README TODO; do \
install -m 0644 $$file \
debian/tmp/usr/share/doc/$(package);\
gzip -9v debian/tmp/usr/share/doc/$(package)/$$file;\
done
ln -s ChangeLog.gz debian/tmp/usr/share/doc/$(package)/changelog.gz
install -m 0644 debian/README.debian \
debian/tmp/usr/share/doc/$(package)
dpkg-shlibdeps -dPre-Depends debian/tmp/usr/bin/find \
debian/tmp/usr/bin/locate debian/tmp/usr/bin/xargs
dpkg-gencontrol -isp
dpkg --build debian/tmp ..
define checkdir
test -f find/find.c -a -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test 0 = "`id -u`"
.PHONY: binary binary-arch binary-indep clean checkroot