Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 6 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 magnus 1
#!/usr/bin/make -f
2
# -*- makefile -*-
3
 
4
# Uncomment this to turn on verbose mode.
5
#export DH_VERBOSE=1
6
 
7
# set some variables
8
ICONDIR=usr/share/icons
9
SHAREDIR=usr/share/crystalcursors
10
WRAPPERDIR=etc/X11/cursors
11
 
12
CFLAGS = -Wall -g
13
 
14
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15
	CFLAGS += -O0
16
else
17
	CFLAGS += -O2
18
endif
19
 
20
configure: configure-stamp
21
configure-stamp:
22
	dh_testdir
23
	# Add here commands to configure the package.
24
 
25
	touch configure-stamp
26
 
27
 
28
build: build-stamp
29
 
30
build-stamp: configure-stamp
31
	dh_testdir
32
 
33
	# Add here commands to compile the package.
34
	$(MAKE)
35
	#docbook-to-man debian/crystalcursors.sgml > crystalcursors.1
36
 
37
	touch build-stamp
38
 
39
clean:
40
	dh_testdir
41
	dh_testroot
42
	rm -f build-stamp configure-stamp
43
 
44
	# Add here commands to clean up after the build process.
45
	[ ! Makefile ] || $(MAKE) clean
46
 
47
	dh_clean
48
 
49
install: build
50
	dh_testdir
51
	dh_testroot
52
	dh_prep
53
	dh_installdirs
54
 
55
	# Add here commands to install the package into debian/crystalcursors.
56
	$(MAKE) install DESTDIR=$(CURDIR)/debian/crystalcursors/$(ICONDIR)
57
	find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \;
58
	find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \;
59
 
60
	# Don't overwrite system's default xcursor, just provide the directory
61
	rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/*
62
 
63
	# Find *.theme and copy 'em to wrapper-location (see #365072)
64
	# We have to change the Inherits line in (only) in the wrapper *.themes:
65
	#  1) find .themes
66
	#  2) remove lines with "Inherits" and save as tmp
67
	#  3) write new Inherits-line with name of the directory in /usr/share/icons
68
	# -- I know this is tricky, but I have not yet found a more elegant way to make
69
	#    crystalcursors work with debian's update-alternative
70
	OLDDIR=`pwd` ;\
71
	cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \
72
	for theme in crystal*; do \
73
	    grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \
74
	    echo "Inherits = $${theme}" >> tmp ; \
75
	    install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \
76
	    rm tmp; \
77
	done ; \
78
	cd $${OLDDIR}
79
 
80
# Build architecture-independent files here.
81
binary-indep: build install
82
	dh_testdir
83
	dh_testroot
84
	dh_installchangelogs CHANGELOG
85
	dh_installdocs
86
#	dh_installexamples
87
#	dh_install
88
#	dh_installmenu
89
#	dh_installdebconf
90
#	dh_installlogrotate
91
#	dh_installemacsen
92
#	dh_installpam
93
#	dh_installmime
94
#	dh_installinit
95
#	dh_installcron
96
#	dh_installinfo
97
#	dh_installman
98
#	dh_link
99
#	dh_strip
100
	dh_compress
101
	dh_fixperms
102
#	dh_perl
103
#	dh_python
104
#	dh_makeshlibs
105
	dh_installdeb
106
	dh_shlibdeps
107
	dh_gencontrol
108
	dh_md5sums
109
	dh_builddeb
110
 
111
# Build architecture-dependent files here.
112
binary-arch: build install
113
 
114
binary: binary-indep binary-arch
115
.PHONY: build clean binary-indep binary-arch binary install configure