File: rules

package info (click to toggle)
crystalcursors 1.1.1-14
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 3,680 kB
  • sloc: makefile: 632; sh: 232
file content (87 lines) | stat: -rwxr-xr-x 2,416 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
87
#!/usr/bin/make -f
# -*- makefile -*-

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

# set some variables
ICONDIR=usr/share/icons
SHAREDIR=usr/share/crystalcursors
WRAPPERDIR=etc/X11/cursors

build: build-indep

build-arch:
build-indep: build-stamp
build-stamp:
	dh_testdir

	$(MAKE)

	touch build-stamp

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

	$(MAKE) clean

	dh_clean 

install: build-indep
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/crystalcursors.
	$(MAKE) install PREFIX=$(CURDIR)/debian/crystalcursors/$(ICONDIR)
	find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \;
	find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \;

	# Don't overwrite system's default xcursor, just provide the directory
	rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/*

	# There are no left-hand "cross" cursors, so don't symlink to them:
	rm $(CURDIR)/debian/crystalcursors/$(ICONDIR)/crystal*left/cursors/plus

	# Find *.theme and copy 'em to wrapper-location (see #365072)
	# We have to change the Inherits line in (only) in the wrapper *.themes:
	#  1) find .themes
	#  2) remove lines with "Inherits" and save as tmp
	#  3) write new Inherits-line with name of the directory in /usr/share/icons
	# -- I know this is tricky, but I have not yet found a more elegant way to make
	#    crystalcursors work with debian's update-alternative 
	# In addition, add new symlinks that Qt 4 looks for

	cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \
	for theme in crystal*; do \
	    grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \
	    echo "Inherits = $${theme}" >> tmp ; \
	    install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \
	    rm tmp; \
	    while read target link; do \
	        if [ -e $$theme/cursors/$$target ]; then ln -sf $$target $$theme/cursors/$$link; fi; \
	    done < $(CURDIR)/debian/extra_symlinks;\
	done

binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG
	dh_installdocs
#	dh_install
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:
# No arch-dependent packages

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