1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/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!
|