5 CFLAGS = -g -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
8 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
14 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
18 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
19 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20 MAKEFLAGS += -j$(NUMJOBS)
27 v = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
29 a = $(shell dpkg --print-architecture)
34 # Builds the binary package.
36 $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
40 # Undoes the effect of `make -f debian/rules build'.
43 dh_clean build debian/substvars
45 binary: binary-arch binary-indep
52 test -f build || $(MAKE) -f debian/rules build
53 # Makes a binary package.
54 /bin/rm -rf debian/tmp
55 test -f stamp-build || $(MAKE) -f debian/rules build
56 install -d -g root -m 755 -o root debian/tmp
58 install -d -g root -m 755 -o root debian/tmp/DEBIAN
59 install -d -g root -m 755 -o root debian/tmp/usr/bin
60 install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
61 install -g root -o root -m 755 mmv debian/tmp/usr/bin
63 install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
64 gzip -9f debian/tmp/usr/share/man/man1/mmv.1
65 (cd debian/tmp/usr/bin;\
69 (cd debian/tmp/usr/share/man/man1;\
70 ln -s mmv.1.gz mcp.1.gz; \
71 ln -s mmv.1.gz mad.1.gz; \
72 ln -s mmv.1.gz mln.1.gz;)
73 install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
77 chmod -R g-sw debian/tmp/usr/share/doc/$(p)
78 chown -R root.root debian/tmp/usr/share/doc/$(p)
79 dpkg-shlibdeps debian/tmp/usr/bin/mmv
82 dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb