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 42 43 44 45 46 47
|
#! /usr/bin/make -f
.PHONY: build clean binary binary-indep binary-arch checkdir checkroot
package=xasteroids
d=$(shell pwd)/debian/tmp
STRIP=strip
BFLAGS=CFLAGS='-g -O2 -Wall' LDFLAGS='-L/usr/X11R6/lib -s'
build: Makefile
$(MAKE) $(BFLAGS)
touch build
clean:
-$(RM) -r build debian/{tmp,substvars,files}
$(MAKE) clean
find . -name \*~ -print0 | xargs -0 $(RM)
binary: binary-indep binary-arch
binary-indep: build
binary-arch: build
$(RM) -r debian/{tmp,substvars,files}
install -d $(d)/DEBIAN
install -d $(d)/usr/man/man6
install -d $(d)/usr/games
install -m 0755 xast.exe $(d)/usr/games/xasteroids
$(STRIP) $(d)/usr/games/xasteroids
install -m 0644 xast.man $(d)/usr/man/man6/xasteroids.6
gzip -9f $(d)/usr/man/*/*
install -d $(d)/usr/doc/xasteroids
install -m 0644 xast.docs $(d)/usr/doc/xasteroids/
install -m 0644 debian/changelog $(d)/usr/doc/xasteroids/changelog
gzip -9f $(d)/usr/doc/xasteroids/*
install -m 0644 debian/copyright $(d)/usr/doc/xasteroids/copyright
dpkg-shlibdeps $(d)/usr/games/xasteroids
dpkg-gencontrol -p$(package) -P$(d)
dpkg --build $(d) ..
.PHONY: binary binary-arch binary-indep clean
|