File: rules

package info (click to toggle)
loop-aes 3.1d-13etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,508 kB
  • ctags: 834
  • sloc: ansic: 4,467; asm: 1,786; sh: 579; makefile: 574; python: 53
file content (86 lines) | stat: -rw-r--r-- 2,133 bytes parent folder | download | duplicates (2)
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
82
83
84
85
86
#!/usr/bin/make -f

# loop-AES build options
OPTIONS := KEYSCRUB=y RUNDM=n MODINST=n MODVERDIR=$(PWD)/symbols 

PACKAGE	:= loop-aes
MA_DIR  ?= /usr/share/modass
-include $(MA_DIR)/include/generic.make
-include $(MA_DIR)/include/common-rules.make

PKGDIR  := debian/loop-aes-modules-$(KVERS)
DOCDIR  := $(PKGDIR)/usr/share/doc/loop-aes-modules-$(KVERS)

KV := $(shell echo "$(KVERS)" | sed -e 's/^\([2-9]\.[2-9]\)\..*/\1/')
ifeq (2.6,$(KV))
MODDIR  := $(PKGDIR)/lib/modules/$(KVERS)/updates
OPTIONS += USE_KBUILD=y
else
MODDIR  := $(PKGDIR)/lib/modules/$(KVERS)/kernel/drivers/block
endif

configure: prep-deb-files

kdist_config: configure

kdist_clean:
	$(ROOT_CMD) make -f debian/rules clean

build: build-stamp
build-stamp: configure
	$(MAKE) -C loop-AES $(OPTIONS) LINUX_SOURCE=$(KSRC)
	$(MAKE) -C ciphers $(OPTIONS) LINUX_SOURCE=$(KSRC)
	touch build-stamp

install: install-stamp
install-stamp: build
	# install modules
	m=loop; \
	for module in tmp-d-kbuild/$$m.ko $$m.ko $$m.o; do \
	    if [ -f loop-AES/$$module ]; then \
	        mod=`basename $$module`; \
	        install -m644 -b -D loop-AES/$$module $(MODDIR)/$$mod; \
		break; \
	    fi \
	done \

	# loop_*
	for m in loop_serpent loop_twofish loop_blowfish; do \
	    for module in tmp-d-kbuild/$$m.ko $$m.ko $$m.o; do \
		if [ -f ciphers/$$module ]; then \
		    mod=`basename $$module`; \
		    install -m644 -b -D ciphers/$$module $(MODDIR)/$$mod; \
		fi \
	    done \
	done

	touch install-stamp

binary-modules: configure build install
	dh_testdir
	dh_testroot
	dh_installdirs
	dh_installdocs loop-AES/README
	dh_installchangelogs loop-AES/ChangeLog

	cp ciphers/README $(DOCDIR)/README.ciphers
	cp ciphers/ChangeLog $(DOCDIR)/changelog.ciphers

	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol -- -v$(VERSION)
	dh_md5sums
	dh_builddeb --destdir=$(DEB_DESTDIR)

clean:
	dh_testdir
	dh_testroot
	$(MAKE) -C loop-AES clean
	$(MAKE) -C ciphers clean
	rm -f build-stamp install-stamp
	dh_clean

.PHONY: clean configure build binary-indep binary-arch binary binary-modules install kdist_config kdist_clean

# $Id: rules.modules 1879 2006-08-07 14:02:32Z max $