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'.
45 [ ! -f Makefile ] || $(MAKE) clean
46 -rm -f debian/files* debian/substvars* debian/*~ core */core *~
50 binary: binary-arch binary-indep
57 test -f build || $(MAKE) -f debian/rules build
58 # Makes a binary package.
59 /bin/rm -rf debian/tmp
60 test -f stamp-build || $(MAKE) -f debian/rules build
61 install -d -g root -m 755 -o root debian/tmp
63 install -d -g root -m 755 -o root debian/tmp/DEBIAN
64 install -d -g root -m 755 -o root debian/tmp/usr/bin
65 install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
66 $(INSTALL_PROGRAM) -g root -o root -m 755 mmv debian/tmp/usr/bin
67 test "$(STRIP)" != true || strip \
68 --remove-section=.comment --remove-section=.note \
69 debian/tmp/usr/bin/mmv
70 install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
71 gzip -9f debian/tmp/usr/share/man/man1/mmv.1
72 (cd debian/tmp/usr/bin;\
76 (cd debian/tmp/usr/share/man/man1;\
77 ln -s mmv.1.gz mcp.1.gz; \
78 ln -s mmv.1.gz mad.1.gz; \
79 ln -s mmv.1.gz mln.1.gz;)
80 install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
81 install -g root -m 644 -o root READ.ME \
82 debian/tmp/usr/share/doc/$(p)
83 install -g root -m 644 -o root debian/changelog \
84 debian/tmp/usr/share/doc/$(p)/changelog.Debian
85 gzip -f9 debian/tmp/usr/share/doc/$(p)/*
86 install -g root -m 644 -o root debian/copyright \
87 debian/tmp/usr/share/doc/$(p)
88 chmod -R g-sw debian/tmp/usr/share/doc/$(p)
89 chown -R root.root debian/tmp/usr/share/doc/$(p)
90 dpkg-shlibdeps debian/tmp/usr/bin/mmv
92 cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
93 xargs -r0 md5sum > DEBIAN/md5sums
94 dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb