#!/usr/bin/make -f tmp=$(shell pwd)/debian/leave ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) optflag=-O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) stripflag=-s endif leave: leave.c cc -g $(optflag) -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= leave.c -o leave # used to have 'pmake CFLAGS="..." leave' here, but why? build: leave clean: test -f leave.c || { echo not in the right dir\!; exit 1; } test `id -u` -eq 0 || { echo "don't have (pseudo-)root!"; exit 1; } rm -f build-stamp leave leave.o leave.cat1 debian/files debian/substvars rm -rf $(tmp) binary-arch binary: build test `id -u` -eq 0 || { echo "don't have (pseudo-)root!"; exit 1; } rm -rf $(tmp) install -d -m 755 $(tmp)/usr/bin $(tmp)/usr/share/man/man1 \ $(tmp)/DEBIAN $(tmp)/usr/share/doc/leave install $(stripflag) -m 755 leave $(tmp)/usr/bin gzip -c9 leave.1 > $(tmp)/usr/share/man/man1/leave.1.gz gzip -c9 debian/changelog > $(tmp)/usr/share/doc/leave/changelog.Debian.gz install -m 644 debian/copyright $(tmp)/usr/share/doc/leave dpkg-shlibdeps $(tmp)/usr/bin/leave dpkg-gencontrol -isp -P$(tmp) chown -R root.root $(tmp) chmod -R g-ws $(tmp) dpkg --build $(tmp) .. binary-indep: # do nothing, successfully!