File: rules

package info (click to toggle)
socks4-server 4.3.beta2-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,484 kB
  • ctags: 1,752
  • sloc: ansic: 19,135; makefile: 362; sh: 64
file content (74 lines) | stat: -rwxr-xr-x 2,477 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=socks4

build:
	$(checkdir)
	
	make

	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/libsocks4 debian/socks4-clients `find debian/* -type d` debian/files* core
	-rm -f debian/*substvars

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp `find debian/* -type d`
	install -d debian/tmp debian/socks4-clients debian/libsocks4
	cd debian/tmp && install -d `cat ../dirs.socks4-server`
	cd debian/socks4-clients && install -d `cat ../dirs.socks4-clients`
	cd debian/libsocks4 && install -d `cat ../dirs.libsocks4`
#server install
	make install.server install.mkfc DESTDIR=`pwd`/debian/tmp
	install -m 755 sockd/rsockd `pwd`/debian/tmp/usr/sbin/
	install -m 644 debian/sockd.conf `pwd`/debian/tmp/etc/
	install -m 644 debian/sockd.route `pwd`/debian/tmp/etc/
#client install
	make install.clients DESTDIR=`pwd`/debian/tmp
	install -m 644 debian/socks.conf `pwd`/debian/tmp/etc/
	install debian/copyright debian/socks4-clients/usr/doc/socks4-clients
	install debian/changelog debian/socks4-clients/usr/doc/socks4-clients/changelog.Debian
#libs install
	make install.lib DESTDIR=`pwd`/debian/tmp
	install -m 644 lib/libsocks.so.4.3 `pwd`/debian/tmp/usr/lib/
#	ln -s libsocks.so.4.3 debian/tmp/usr/lib/libsocks.so.4
	ln -s libsocks.so.4 debian/tmp/usr/lib/libsocks.so
	install debian/copyright debian/libsocks4/usr/doc/libsocks4
	install debian/changelog debian/libsocks4/usr/doc/libsocks4/changelog.Debian
	make install.man DESTDIR=`pwd`/debian/tmp
	chmod 755 debian/tmp/usr/bin/*
	chmod 755 debian/tmp/usr/sbin/*
	chmod 644 debian/tmp/usr/man/man*/*
	debstd -m CHANGES README.1st README.4.0 README.4.1 README.4.2 README.4.3.beta2 README.DK COPYRIGHTS
	dpkg-gencontrol -psocks4-server
	chown -R root.root debian/tmp debian/socks4-clients debian/libsocks4
	chmod -R go=rX debian/tmp debian/socks4-clients debian/libsocks4
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot