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
|
name = dconf
version = $(shell awk '/^Version: / {print $$2}' $(name).spec)
prefix = /usr
sysconfdir = /etc
bindir = $(prefix)/bin
sbindir = $(prefix)/sbin
libdir = $(prefix)/lib
datadir = $(prefix)/share
mandir = $(datadir)/man
localstatedir = /var
logdir = $(localstatedir)/log/dconf
all:
@echo "Nothing to be build."
install: dconf.1
# -[ ! -f $(DESTDIR)$(sysconfdir)/dconf.conf ] && install -D -m0644 dconf.conf $(DESTDIR)$(sysconfdir)/dconf.conf
-@[ ! -f $(DESTDIR)$(sysconfdir)/dconf-custom.conf ] && install -D -m0644 config/dconf-custom.conf $(DESTDIR)$(sysconfdir)/dconf-custom.conf
install -Dp -m0755 dconf $(DESTDIR)$(bindir)/dconf
install -Dp -m0644 dconf.1 $(DESTDIR)$(mandir)/man1/dconf.1
install -dp -m0755 $(DESTDIR)$(logdir)
@echo "Also do: make install-<dist> (with dist: debian|redhat|suse)"
install-redhat:
install -Dp -m0644 config/dconf-redhat.conf $(DESTDIR)$(sysconfdir)/dconf.conf
install-debian:
install -Dp -m0644 config/dconf-debian.conf $(DESTDIR)$(sysconfdir)/dconf.conf
install-suse:
install -Dp -m0644 config/dconf-suse.conf $(DESTDIR)$(sysconfdir)/dconf.conf
clean:
rm -f dconf.1 dconf.1.html dconf.1.xml
%.html: %.txt
asciidoc -b xhtml11 -d manpage $<
%.1: %.1.xml
xmlto --skip-validation man $<
%.xml: %.txt
asciidoc -b docbook -d manpage $<
dist: clean
find . ! -wholename '*/.svn*' | pax -d -w -x ustar -s ,^,$(name)-$(version)/, | bzip2 >../$(name)-$(version).tar.bz2
rpm: dist
rpmbuild -tb --clean --rmsource --rmspec --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_rpmdir ../" ../$(name)-$(version).tar.bz2
srpm: dist
rpmbuild -ts --clean --rmsource --rmspec --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_srcrpmdir../" ../$(name)-$(version).tar.bz2
|