4 # Part of ComixCursors, a desktop cursor theme.
6 # Copyright © 2010–2013 Ben Finney <ben+opendesktop@benfinney.id.au>
7 # Copyright © 2006–2013 Jens Luetkens <j.luetkens@limitland.de>
8 # Copyright © 2003 Unai G
10 # This work is free software: you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # This work is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this work. If not, see <http://www.gnu.org/licenses/>.
23 # Makefile for ComixCursors project.
27 CURSORSNAME
= ComixCursors
28 PACKAGENAME ?
= ${CURSORSNAME}
29 SUMMARY ?
= The original Comix Cursors
30 ICONSDIR ?
= ${HOME}/.icons
35 ifeq (@LH-
,$(findstring @LH-
,@
${THEMEOPTIONS}))
36 orientation
= LeftHanded
38 orientation
= RightHanded
43 indir
= ${svgdir}/${orientation}
46 xcursor_builddir
= cursors
48 configdir
= ComixCursorsConfigs
49 configfile
= ${configdir}/${THEMENAME}.CONFIG
50 themefile
= ${builddir}/${THEMENAME}.theme
52 destdir
= ${ICONSDIR}/${CURSORSNAME}${THEMEOPTIONS}${THEMEINCLUDE}${SIZENAME}-${THEMENAME}
53 xcursor_destdir
= ${destdir}/cursors
55 template_configfile
= ${configdir}/Custom.CONFIG
56 template_themefile
= ${configdir}/Custom.theme
58 # Derive cursor file names.
59 conffiles
= $(wildcard ${builddir}/*.conf
)
60 cursornames
= $(foreach conffile
,${conffiles},$(basename $(notdir ${conffile})))
61 cursorfiles
= $(foreach cursor
,${cursornames},${xcursor_builddir}/${cursor})
63 GENERATED_FILES
+= ${svgdir}/*/*.frame
*.svg
64 GENERATED_FILES
+= ${workdir}
65 GENERATED_FILES
+= ${builddir}
66 GENERATED_FILES
+= ${xcursor_builddir}
67 GENERATED_FILES
+= ${distdir}
71 rpm_specfile_changelog
= specfile-changelog
72 rpm_specfile
= ${PACKAGENAME}.spec
73 rpm_spec_template
= ${CURSORSNAME}.spec.in
75 GENERATED_FILES
+= ${rpm_specfile_changelog} *.spec
77 LINK_CURSORS
= "${bindir}/link-cursors"
78 MAKE_SPECFILE_CHANGELOG
= "${bindir}/news-to-specfile-changelog"
79 MAKE_SPECFILE
= "${bindir}/make-specfile"
85 ${xcursor_builddir}/%: ${builddir}/%.conf
$(wildcard ${builddir}/%*.png
)
91 # Create necessary directories.
92 install -d
"${ICONSDIR}" "${ICONSDIR}/default"
94 install -d
"${xcursor_destdir}"
96 # Install the cursors.
97 install -m u
=rw
,go
=r
"${xcursor_builddir}"/* "${xcursor_destdir}"
99 # Install the theme configuration file.
100 install -m u
=rw
,go
=r
"${themefile}" "${destdir}/index.theme"
102 # Install alternative name symlinks for the cursors.
103 $(LINK_CURSORS
) "${xcursor_destdir}"
107 $(RM
) -r
"${destdir}"
111 custom-theme
: ${configfile} ${themefile}
113 ${configfile}: ${template_configfile}
116 ${themefile}: ${template_themefile}
117 install -d
"${builddir}"
124 ${rpm_specfile_changelog}: ${news_file}
125 $(MAKE_SPECFILE_CHANGELOG
) < "$<" > "$@"
127 ${rpm_specfile}: ${rpm_spec_template} ${rpm_specfile_changelog}
133 $(RM
) -r
${GENERATED_FILES}
140 # vim: filetype=make fileencoding=utf-8 :