3 INSTALL_PROGRAM=install
6 CFLAGS = -g -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
9 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
15 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
21 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23 MAKEFLAGS += -j$(NUMJOBS)
30 v = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
32 a = $(shell dpkg --print-architecture)
37 # Builds the binary package.
39 $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
43 # Undoes the effect of `make -f debian/rules build'.
46 dh_clean build debian/substvars
48 binary: binary-arch binary-indep
55 test -f build || $(MAKE) -f debian/rules build
56 # Makes a binary package.
57 /bin/rm -rf debian/tmp
58 test -f stamp-build || $(MAKE) -f debian/rules build
59 install -d -g root -m 755 -o root debian/tmp
61 install -d -g root -m 755 -o root debian/tmp/DEBIAN
62 install -d -g root -m 755 -o root debian/tmp/usr/bin
63 install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
64 install -d -g root -m 755 -o root debian/tmp/usr/share/lintian/overrides
65 $(INSTALL_PROGRAM) -g root -o root -m 755 mmv debian/tmp/usr/bin
66 test "$(STRIP)" != true || strip \
67 --remove-section=.comment --remove-section=.note \
68 debian/tmp/usr/bin/mmv
69 install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
70 gzip -9f debian/tmp/usr/share/man/man1/mmv.1
71 (cd debian/tmp/usr/bin;\
75 (cd debian/tmp/usr/share/man/man1;\
76 ln -s mmv.1.gz mcp.1.gz; \
77 ln -s mmv.1.gz mad.1.gz; \
78 ln -s mmv.1.gz mln.1.gz;)
79 install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
80 install -g root -m 644 -o root READ.ME \
81 debian/tmp/usr/share/doc/$(p)
82 install -g root -m 644 -o root debian/changelog \
83 debian/tmp/usr/share/doc/$(p)/changelog.Debian
84 gzip -f9 debian/tmp/usr/share/doc/$(p)/*
85 install -g root -m 644 -o root debian/copyright \
86 debian/tmp/usr/share/doc/$(p)
87 install -g root -m 644 -o root debian/lintian-overrides \
88 debian/tmp/usr/share/lintian/overrides/mmv
89 chmod -R g-sw debian/tmp/usr/share/doc/$(p)
90 chown -R root.root debian/tmp/usr/share/doc/$(p)
91 dpkg-shlibdeps debian/tmp/usr/bin/mmv
93 cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
94 xargs -r0 md5sum > DEBIAN/md5sums
95 dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb