[go: up one dir, main page]

File: rules

package info (click to toggle)
uhub 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,016 kB
  • sloc: ansic: 12,630; xml: 588; sh: 356; perl: 233; makefile: 60
file content (81 lines) | stat: -rwxr-xr-x 1,642 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
75
76
77
78
79
80
81
#!/usr/bin/make -f

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

ifeq (,$(NUMJOBS))
	NUMJOBS = 1
endif

PACKAGE = uhub
DEVELOPER = janvidar
PROJECT = uhub

CUR_VER = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')

MAKEOPTS := DESTDIR=$(CURDIR)/debian/uhub/ \
            UHUB_PREFIX=$(CURDIR)/debian/uhub/usr \
            RELEASE=YES

build: build-arch build-indep

build-arch: build-stamp

build-indep: build-stamp

build-stamp:
	dh_testdir
	$(MAKE) -j$(NUMJOBS) $(MAKEOPTS)
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	$(MAKE) clean
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install $(MAKEOPTS)
	chmod 0750 $(CURDIR)/debian/uhub/var/log/uhub

get-orig-source:
	# preparation
	rm -rf  "$(CUR_VER)"/ "$(PACKAGE)-$(CUR_VER)"/
	# sources
	wget -4 "http://nodeload.github.com/$(DEVELOPER)/$(PROJECT)/tarball/$(CUR_VER)"
	rm -rf $(DEVELOPER)-$(PROJECT)-*
	tar xzf "$(CUR_VER)"
	mv $(DEVELOPER)-$(PROJECT)-* "$(PACKAGE)-$(CUR_VER)"
	# tarball
	tar -cjf "$(PACKAGE)_$(CUR_VER).orig.tar.bz2" "$(PACKAGE)-$(CUR_VER)"
	# cleaning
	rm -rf "$(PACKAGE)-$(CUR_VER)" "$(CUR_VER)"

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installinit
	dh_installlogrotate
	dh_installman -A
	dh_installchangelogs ChangeLog
	dh_strip
	dh_lintian
	dh_compress
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install