File: rules

package info (click to toggle)
lodju 2.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 456 kB
  • ctags: 814
  • sloc: python: 4,698; ansic: 139; makefile: 64; sh: 21
file content (45 lines) | stat: -rwxr-xr-x 1,323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/make -f

package=lodju

build:
	$(MAKE) _lodju.so

binary: binary-arch binary-indep

binary-arch:
	rm -rf debian/tmp
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/usr/bin
	install -d debian/tmp/usr/lib/$(package)
	install -d debian/tmp/usr/share/doc/$(package)
	install -d debian/tmp/usr/share/man/man1

	$(MAKE) bindir=debian/tmp/usr/bin \
	    	libdir=debian/tmp/usr/lib/$(package) \
	    	sharedir=debian/tmp/usr/share/$(package) \
	    	man1dir=debian/tmp/usr/share/man/man1 \
		install
	sed 's#^SHAREDIR.*#SHAREDIR = "/usr/share/lodju"#' lodju.py | \
	    sed 's#^LIBDIR.*#LIBDIR = "/usr/lib/lodju"#;' \
	    > debian/tmp/usr/bin/lodju
	chmod +x debian/tmp/usr/bin/lodju
	strip --strip-unneeded -R .note -R .comment \
	    debian/tmp/usr/lib/$(package)/_lodju.so

	cp ChangeLog debian/tmp/usr/share/doc/$(package)/changelog
	cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
	cp NEWS README debian/tmp/usr/share/doc/$(package)/
	gzip -9 debian/tmp/usr/share/doc/$(package)/*
	gzip -9 debian/tmp/usr/share/man/man1/*
	cp debian/copyright debian/tmp/usr/share/doc/$(package)
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R o-s,go=u,go-ws debian/tmp
	dpkg --build debian/tmp ..

binary-indep:

clean:
	$(MAKE) clean
	rm -rf debian/tmp debian/files *.pyc