Rev 8 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8 | Rev 17 | ||
---|---|---|---|
1 | #!/usr/bin/make -f |
1 | #!/usr/bin/make -f |
2 | # -*- makefile -*- |
2 | # -*- makefile -*- |
3 | 3 | ||
4 | # Uncomment this to turn on verbose mode. |
4 | # Uncomment this to turn on verbose mode. |
5 | #export DH_VERBOSE=1 |
5 | #export DH_VERBOSE=1 |
6 | 6 | ||
7 | # set some variables |
7 | # set some variables |
8 | ICONDIR=usr/share/icons |
8 | ICONDIR=usr/share/icons |
9 | SHAREDIR=usr/share/crystalcursors |
9 | SHAREDIR=usr/share/crystalcursors |
10 | WRAPPERDIR=etc/X11/cursors |
10 | WRAPPERDIR=etc/X11/cursors |
11 | 11 | ||
12 | build: build-indep |
12 | build: build-indep |
13 | 13 | ||
14 | build-indep: build-stamp |
14 | build-indep: build-stamp |
15 | build-stamp: |
15 | build-stamp: |
16 | dh_testdir |
16 | dh_testdir |
17 | 17 | ||
18 | $(MAKE) |
18 | $(MAKE) |
19 | 19 | ||
20 | touch build-stamp |
20 | touch build-stamp |
21 | 21 | ||
22 | clean: |
22 | clean: |
23 | dh_testdir |
23 | dh_testdir |
24 | dh_testroot |
24 | dh_testroot |
25 | rm -f build-stamp configure-stamp |
25 | rm -f build-stamp configure-stamp |
26 | 26 | ||
27 | $(MAKE) clean |
27 | $(MAKE) clean |
28 | 28 | ||
29 | dh_clean |
29 | dh_clean |
30 | 30 | ||
31 | install: build-indep |
31 | install: build-indep |
32 | dh_testdir |
32 | dh_testdir |
33 | dh_testroot |
33 | dh_testroot |
34 | dh_prep |
34 | dh_prep |
35 | dh_installdirs |
35 | dh_installdirs |
36 | 36 | ||
37 | # Add here commands to install the package into debian/crystalcursors. |
37 | # Add here commands to install the package into debian/crystalcursors. |
38 | $(MAKE) install PREFIX=$(CURDIR)/debian/crystalcursors/$(ICONDIR) |
38 | $(MAKE) install PREFIX=$(CURDIR)/debian/crystalcursors/$(ICONDIR) |
39 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \; |
39 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \; |
40 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \; |
40 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \; |
41 | 41 | ||
42 | # Don't overwrite system's default xcursor, just provide the directory |
42 | # Don't overwrite system's default xcursor, just provide the directory |
43 | rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/* |
43 | rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/* |
44 | 44 | ||
- | 45 | # There are no left-hand "cross" cursors, so don't symlink to them: |
|
- | 46 | rm $(CURDIR)/debian/crystalcursors/$(ICONDIR)/crystal*left/cursors/plus |
|
- | 47 | ||
45 | # Find *.theme and copy 'em to wrapper-location (see #365072) |
48 | # Find *.theme and copy 'em to wrapper-location (see #365072) |
46 | # We have to change the Inherits line in (only) in the wrapper *.themes: |
49 | # We have to change the Inherits line in (only) in the wrapper *.themes: |
47 | # 1) find .themes |
50 | # 1) find .themes |
48 | # 2) remove lines with "Inherits" and save as tmp |
51 | # 2) remove lines with "Inherits" and save as tmp |
49 | # 3) write new Inherits-line with name of the directory in /usr/share/icons |
52 | # 3) write new Inherits-line with name of the directory in /usr/share/icons |
50 | # -- I know this is tricky, but I have not yet found a more elegant way to make |
53 | # -- I know this is tricky, but I have not yet found a more elegant way to make |
51 | # crystalcursors work with debian's update-alternative |
54 | # crystalcursors work with debian's update-alternative |
52 | # In addition, add new symlinks that Qt 4 looks for |
55 | # In addition, add new symlinks that Qt 4 looks for |
53 | 56 | ||
54 | cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \ |
57 | cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \ |
55 | for theme in crystal*; do \ |
58 | for theme in crystal*; do \ |
56 | grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \ |
59 | grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \ |
57 | echo "Inherits = $${theme}" >> tmp ; \ |
60 | echo "Inherits = $${theme}" >> tmp ; \ |
58 | install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \ |
61 | install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \ |
59 | rm tmp; \ |
62 | rm tmp; \ |
60 | while read target link; do \ |
63 | while read target link; do \ |
61 | if [ -e $$theme/cursors/$$target ]; then ln -sf $$target $$theme/cursors/$$link; fi; \ |
64 | if [ -e $$theme/cursors/$$target ]; then ln -sf $$target $$theme/cursors/$$link; fi; \ |
62 | done < $(CURDIR)/debian/extra_symlinks;\ |
65 | done < $(CURDIR)/debian/extra_symlinks;\ |
63 | done |
66 | done |
64 | 67 | ||
65 | binary-indep: build-indep install |
68 | binary-indep: build-indep install |
66 | dh_testdir |
69 | dh_testdir |
67 | dh_testroot |
70 | dh_testroot |
68 | dh_installchangelogs CHANGELOG |
71 | dh_installchangelogs CHANGELOG |
69 | dh_installdocs |
72 | dh_installdocs |
70 | # dh_install |
73 | # dh_install |
71 | dh_compress |
74 | dh_compress |
72 | dh_fixperms |
75 | dh_fixperms |
73 | dh_installdeb |
76 | dh_installdeb |
74 | dh_shlibdeps |
77 | dh_shlibdeps |
75 | dh_gencontrol |
78 | dh_gencontrol |
76 | dh_md5sums |
79 | dh_md5sums |
77 | dh_builddeb |
80 | dh_builddeb |
78 | 81 | ||
79 | binary-arch: |
82 | binary-arch: |
80 | # No arch-dependent packages |
83 | # No arch-dependent packages |
81 | 84 | ||
82 | binary: binary-indep |
85 | binary: binary-indep |
83 | .PHONY: build-indep build clean binary-indep binary-arch binary install configure |
86 | .PHONY: build-indep build clean binary-indep binary-arch binary install configure |