File: rules

package info (click to toggle)
thinkpad 5.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 604 kB
  • ctags: 1,459
  • sloc: ansic: 5,985; makefile: 226; sh: 179; asm: 44; sed: 22
file content (70 lines) | stat: -rwxr-xr-x 2,201 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
#!/usr/bin/make -f

# This script uses debhelper by Joey Hess
# Portions grabbed from device3dfx-source Copyright (C) 1999 Steve Haslam

export DH_VERBOSE=1
export DH_COMPAT=4
# enables magic below
export DH_OPTIONS

DESTDIR_SOURCE=debian/thinkpad-source
DRIVERTREE=$(DESTDIR_SOURCE)/usr/src/modules/thinkpad
#DOC=$(DESTDIR_SOURCE)/usr/share/doc/thinkpad-source

DESTDIR_BASE=debian/thinkpad-base

#VER=$(shell pwd |sed -e 's/.*-//')
# We write the source version number into the modules proto-changelog
# file. Determine it automagically
OURVERSION := $(shell head -1 debian/changelog | sed -e 's/.*(\(.*\)).*/\1/')

clean:
	dh_testdir
	dh_clean

build:
	dh_testdir

binary-indep:

binary-arch: build
	dh_testdir
	dh_testroot
	#
	# set up -base tree
	dh_installdirs -pthinkpad-base etc/devfs/conf.d etc/udev/rules.d
	install -p -o root -g root -m 0644 debian/thinkpad-base.thinkpad.devfsd.conf $(DESTDIR_BASE)/etc/devfs/conf.d/thinkpad
	install -p -o root -g root -m 0644 debian/thinkpad-base.thinkpad.udev.rules $(DESTDIR_BASE)/etc/udev/thinkpad.rules
	ln -sf ../thinkpad.rules $(DESTDIR_BASE)/etc/udev/rules.d/thinkpad.rules
	dh_installman -pthinkpad-base man/thinkpad.4
	#
	# set up -source tree
	dh_installdirs -pthinkpad-source usr/src/modules/thinkpad/debian
	cp -a 2.2 $(DRIVERTREE)
	cp -a 2.4 $(DRIVERTREE)
	cp -a 2.6 $(DRIVERTREE)
	cp -a debian/thinkpad-modules.d/* debian/copyright $(DRIVERTREE)/debian
	chmod +x $(DRIVERTREE)/debian/rules $(DRIVERTREE)/debian/buildpkg
	sed -e "s!\$$OURVERSION!$(OURVERSION)!" debian/thinkpad-modules.changelog.sed > $(DRIVERTREE)/debian/changelog.sed
	cat debian/changelog >> $(DRIVERTREE)/debian/changelog.sed
	chown -R root:src $(DRIVERTREE)
	find $(DRIVERTREE) -type d | xargs chmod 775
	tar -C $(DESTDIR_SOURCE)/usr/src -c -v -z -f $(DESTDIR_SOURCE)/usr/src/thinkpad.tar.gz modules/thinkpad
	rm -r $(DESTDIR_SOURCE)/usr/src/modules
	#
	# dh_installdebconf
	dh_installmodules --name=thinkpad
	dh_installdocs README TECHNOTES SUPPORTED-MODELS
	dh_installchangelogs ChangeLog
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary:	binary-indep binary-arch

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