3 INSTALL_PROGRAM=install
6 CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
9 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
13 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
22 v = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
24 a = $(shell dpkg --print-architecture)
29 # Builds the binary package.
31 make CC="$(CC)" LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
35 # Undoes the effect of `make -f debian/rules build'.
38 -rm -f debian/files* debian/substvars* debian/*~ core */core *~
42 binary: binary-arch binary-indep
49 test -f build || make -f debian/rules build
50 # Makes a binary package.
51 /bin/rm -rf debian/tmp
52 test -f stamp-build || make -f debian/rules build
53 install -d -g root -m 755 -o root debian/tmp
55 install -d -g root -m 755 -o root debian/tmp/DEBIAN
56 install -d -g root -m 755 -o root debian/tmp/usr/bin
57 install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
58 $(INSTALL_PROGRAM) -g root -o root -m 755 mmv debian/tmp/usr/bin
59 install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
60 gzip -9f debian/tmp/usr/share/man/man1/mmv.1
61 (cd debian/tmp/usr/bin;\
65 (cd debian/tmp/usr/share/man/man1;\
66 ln -s mmv.1.gz mcp.1.gz; \
67 ln -s mmv.1.gz mad.1.gz; \
68 ln -s mmv.1.gz mln.1.gz;)
69 install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
70 install -g root -m 644 -o root READ.ME \
71 debian/tmp/usr/share/doc/$(p)
72 install -g root -m 644 -o root debian/changelog \
73 debian/tmp/usr/share/doc/$(p)/changelog.Debian
74 gzip -f9 debian/tmp/usr/share/doc/$(p)/*
75 install -g root -m 644 -o root debian/copyright \
76 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