File: rules

package info (click to toggle)
glpi 0.68.2-1etch0.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 7,464 kB
  • ctags: 9,655
  • sloc: php: 69,502; sql: 3,514; sh: 175; makefile: 61
file content (79 lines) | stat: -rwxr-xr-x 1,868 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


DESTDIR=$(CURDIR)/debian/glpi
GDIR=$(DESTDIR)/usr/share/glpi
GCONFDIR=$(DESTDIR)/etc/glpi
GVARDIR=$(DESTDIR)/var/lib/glpi

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/glpi.
	install -m 755 -d $(GDIR)
	install -m 755 -d $(GCONFDIR)
	install -m 755 -d $(GVARDIR)
	install -m 644 *.php $(GDIR)
	install -m 644 *.js $(GDIR)
	for dir in * ; do \
	    if [ -d "$$dir" ]; then \
	        case "$$dir" in \
		    CVS|debian) \
			echo "skipping dir $$dir" \
			;; \
		    config) \
		 	cp -ar $$dir $(GCONFDIR)/$$dir ; \
			find $(GCONFDIR)/$$dir -type d -exec chmod 750 {} \; ;\
			;; \
		    files) \
		 	cp -ar $$dir $(GVARDIR)/$$dir ; \
			find $(GVARDIR)/$$dir -type d -exec chmod 750 {} \; ;\
			;; \
		    *) \
		 	cp -ar $$dir $(GDIR)/$$dir ; \
			find $(GDIR)/$$dir -type f -exec chmod 644 {} \; ;\
		esac \
	    fi \
	done
	install -m 644 debian/apache.conf $(GCONFDIR)
	install -m 644 debian/mysql.conf $(DESTDIR)/usr/share/doc/glpi/
	# small fix: remove copy of LGPL in lib/phpmailer and lib/tiny_mce/license.txt
	rm -f $(GDIR)/lib/phpmailer/LICENSE
	rm -f $(GDIR)/lib/tiny_mce/license.txt
	# delete remove.txt files
	find $(DESTDIR) -name remove.txt -exec rm -f {} \;

build:
# Build architecture-dependent files here.
binary-arch: install

# Build architecture-independent files here.
binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG.txt
	dh_installdocs -XCOPYING.txt -Xlicense.txt
	dh_installexamples
	dh_fixperms
	dh_compress
	dh_installdebconf -pglpi
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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