Rev 3 | Rev 8 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3 | Rev 6 | ||
|---|---|---|---|
| 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 | CFLAGS = -Wall -g |
12 | build: build-indep |
| 13 | 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 |
14 | build-indep: build-stamp |
| 29 | - | ||
| 30 | build-stamp: configure-stamp |
15 | build-stamp: |
| 31 | dh_testdir |
16 | dh_testdir |
| 32 | 17 | ||
| 33 | # Add here commands to compile the package. |
- | |
| 34 | $(MAKE) |
18 | $(MAKE) |
| 35 | #docbook-to-man debian/crystalcursors.sgml > crystalcursors.1 |
- | |
| 36 | 19 | ||
| 37 | touch build-stamp |
20 | touch build-stamp |
| 38 | 21 | ||
| 39 | clean: |
22 | clean: |
| 40 | dh_testdir |
23 | dh_testdir |
| 41 | dh_testroot |
24 | dh_testroot |
| 42 | rm -f build-stamp configure-stamp |
25 | rm -f build-stamp configure-stamp |
| 43 | 26 | ||
| 44 | # Add here commands to clean up after the build process. |
- | |
| 45 | [ ! Makefile ] || $(MAKE) clean |
27 | $(MAKE) clean |
| 46 | 28 | ||
| 47 | dh_clean |
29 | dh_clean |
| 48 | 30 | ||
| 49 | install: build |
31 | install: build-indep |
| 50 | dh_testdir |
32 | dh_testdir |
| 51 | dh_testroot |
33 | dh_testroot |
| 52 | dh_prep |
34 | dh_prep |
| 53 | dh_installdirs |
35 | dh_installdirs |
| 54 | 36 | ||
| 55 | # Add here commands to install the package into debian/crystalcursors. |
37 | # Add here commands to install the package into debian/crystalcursors. |
| 56 | $(MAKE) install DESTDIR=$(CURDIR)/debian/crystalcursors/$(ICONDIR) |
38 | $(MAKE) install PREFIX=$(CURDIR)/debian/crystalcursors/$(ICONDIR) |
| 57 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \;
|
39 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type f -exec chmod 644 {} \;
|
| 58 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \;
|
40 | find $(CURDIR)/debian/crystalcursors/$(ICONDIR) -type d -exec chmod 755 {} \;
|
| 59 | 41 | ||
| 60 | # Don't overwrite system's default xcursor, just provide the directory |
42 | # Don't overwrite system's default xcursor, just provide the directory |
| 61 | rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/* |
43 | rm -r $(CURDIR)/debian/crystalcursors/$(ICONDIR)/default/* |
| 62 | 44 | ||
| 63 | # Find *.theme and copy 'em to wrapper-location (see #365072) |
45 | # Find *.theme and copy 'em to wrapper-location (see #365072) |
| 64 | # We have to change the Inherits line in (only) in the wrapper *.themes: |
46 | # We have to change the Inherits line in (only) in the wrapper *.themes: |
| 65 | # 1) find .themes |
47 | # 1) find .themes |
| 66 | # 2) remove lines with "Inherits" and save as tmp |
48 | # 2) remove lines with "Inherits" and save as tmp |
| 67 | # 3) write new Inherits-line with name of the directory in /usr/share/icons |
49 | # 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 |
50 | # -- 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 |
51 | # crystalcursors work with debian's update-alternative |
| 70 | OLDDIR=`pwd` ;\ |
52 | OLDDIR=`pwd` ;\ |
| 71 | cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \ |
53 | cd $(CURDIR)/debian/crystalcursors/$(ICONDIR); \ |
| 72 | for theme in crystal*; do \ |
54 | for theme in crystal*; do \ |
| 73 | grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \
|
55 | grep -v Inherits $(CURDIR)/debian/crystalcursors/$(ICONDIR)/$${theme}/index.theme > tmp ; \
|
| 74 | echo "Inherits = $${theme}" >> tmp ; \
|
56 | echo "Inherits = $${theme}" >> tmp ; \
|
| 75 | install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \
|
57 | install -m 644 tmp $(CURDIR)/debian/crystalcursors/$(WRAPPERDIR)/$${theme}.theme; \
|
| 76 | rm tmp; \ |
58 | rm tmp; \ |
| 77 | done ; \ |
59 | done ; \ |
| 78 | cd $${OLDDIR}
|
60 | cd $${OLDDIR}
|
| 79 | 61 | ||
| 80 | # Build architecture-independent files here. |
- | |
| 81 | binary-indep: build install |
62 | binary-indep: build-indep install |
| 82 | dh_testdir |
63 | dh_testdir |
| 83 | dh_testroot |
64 | dh_testroot |
| 84 | dh_installchangelogs CHANGELOG |
65 | dh_installchangelogs CHANGELOG |
| 85 | dh_installdocs |
66 | dh_installdocs |
| 86 | # dh_installexamples |
- | |
| 87 | # dh_install |
67 | # 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 |
68 | dh_compress |
| 101 | dh_fixperms |
69 | dh_fixperms |
| 102 | # dh_perl |
- | |
| 103 | # dh_python |
- | |
| 104 | # dh_makeshlibs |
- | |
| 105 | dh_installdeb |
70 | dh_installdeb |
| 106 | dh_shlibdeps |
71 | dh_shlibdeps |
| 107 | dh_gencontrol |
72 | dh_gencontrol |
| 108 | dh_md5sums |
73 | dh_md5sums |
| 109 | dh_builddeb |
74 | dh_builddeb |
| 110 | 75 | ||
| 111 | # Build architecture-dependent files here. |
76 | binary-arch: |
| 112 | binary-arch: build install |
77 | # No arch-dependent packages |
| 113 | 78 | ||
| 114 | binary: binary-indep binary-arch |
79 | binary: binary-indep |
| 115 | .PHONY: build clean binary-indep binary-arch binary install configure |
80 | .PHONY: build-indep build clean binary-indep binary-arch binary install configure |