setup/Makefile

89 lines
1.8 KiB
Makefile
Raw Normal View History

2011-04-26 13:22:53 +02:00
include VERSION
PACKAGE=setup
# system locations
prefix = /usr
exec_prefix = ${prefix}
sysconfdir = /etc
sbindir = ${exec_prefix}/sbin
bindir = ${exec_prefix}/bin
mandir = ${prefix}/usr/share/man
datadir = ${prefix}/share
initrddir = ${sysconfdir}/rc.d/init.d
sysconfigdir= ${sysconfdir}/sysconfig
localstatedir = /var
localesdir = ${datadir}/locale/
srcdir = .
DESTDIR =
INSTALL = /usr/bin/install
INSTALL_PROGRAM = ${INSTALL} -m 755
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = ${INSTALL} -d -m 755
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
cfg_files_list=\
bashrc \
csh.cshrc \
csh.login \
dircolors \
dircolors.xterm \
filesystems \
fstab \
group \
host.conf \
hosts \
hosts.allow \
hosts.deny \
inputrc \
motd \
nsswitch.conf \
passwd \
printcap \
profile \
resolv.conf \
securetty \
shells
all:
install-dirs:
$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/profile.d
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/spool/uucp
install: install-dirs
for f in $(cfg_files_list); do\
$(INSTALL_DATA) config/$$f $(DESTDIR)$(sysconfdir)/$$f; \
done
for f in profile.d/*.{,csh,sh}; do\
$(INSTALL_SCRIPT) $$f $(DESTDIR)$(sysconfdir)/$$f;\
done
dist: clean
@case `sed 15q ChangeLog` in \
*"$(VERSION)"*) : ;; \
*) \
echo "ChangeLog not updated; not releasing" 1>&2;\
exit 1;; \
esac
2011-06-07 17:33:06 +02:00
@git log > ChangeLog.git
2011-06-07 17:38:35 +02:00
@mkdir /tmp/$(distdir)
@cp -a * /tmp/$(distdir)/
2011-04-26 13:22:53 +02:00
@rm -f $(dist_archive);\
2011-06-07 17:38:35 +02:00
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
@rm -rf /tmp/$(distdir)
2011-04-26 13:22:53 +02:00
@echo "file \`$(dist_archive)' created"
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f $(dist_archive) $$rpm_sourcedir;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
clean: