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 *~
39 -rm -rf debian/tmp build
41 binary: binary-arch binary-indep
48 test -f build || make -f debian/rules build
49 # Makes a binary package.
50 /bin/rm -rf debian/tmp
51 test -f stamp-build || make -f debian/rules build
52 install -d -g root -m 755 -o root debian/tmp
54 install -d -g root -m 755 -o root debian/tmp/DEBIAN
55 install -d -g root -m 755 -o root debian/tmp/usr/bin
56 install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
57 $(INSTALL_PROGRAM) -g root -o root -m 755 mmv debian/tmp/usr/bin
58 install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
59 gzip -9f debian/tmp/usr/share/man/man1/mmv.1
60 (cd debian/tmp/usr/bin;\
64 (cd debian/tmp/usr/share/man/man1;\
65 ln -s mmv.1.gz mcp.1.gz; \
66 ln -s mmv.1.gz mad.1.gz; \
67 ln -s mmv.1.gz mln.1.gz;)
68 install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
69 install -g root -m 644 -o root READ.ME \
70 debian/tmp/usr/share/doc/$(p)
71 install -g root -m 644 -o root debian/changelog \
72 debian/tmp/usr/share/doc/$(p)/changelog.Debian
73 gzip -f9 debian/tmp/usr/share/doc/$(p)/*
74 install -g root -m 644 -o root debian/copyright \
75 debian/tmp/usr/share/doc/$(p)
76 chmod -R g-sw debian/tmp/usr/share/doc/$(p)
77 chown -R root.root debian/tmp/usr/share/doc/$(p)
78 dpkg-shlibdeps debian/tmp/usr/bin/mmv
81 dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb