76 lines
2.1 KiB
Makefile
76 lines
2.1 KiB
Makefile
|
# Makefile for openmamba-headserver-tools
|
||
|
# Copyright (C) 2007-2008 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
|
||
|
PACKAGE = openmamba-headserver-tools
|
||
|
|
||
|
DISTROID = openmamba
|
||
|
|
||
|
RPM_VENDOR = openmamba
|
||
|
RPM_DISTRIBUTION = openmamba
|
||
|
RPM_DISTROEXT = mamba
|
||
|
|
||
|
SYSCONFIGFILE = openmamba-central
|
||
|
|
||
|
include VERSION
|
||
|
|
||
|
DISTROid = $(shell echo $(DISTROID) | tr A-Z a-z)
|
||
|
DISTROICON = $(DISTROid)
|
||
|
|
||
|
DESTDIR =
|
||
|
|
||
|
prefix = /usr
|
||
|
exec_prefix = ${prefix}
|
||
|
sysconfdir = /etc
|
||
|
sbindir = ${exec_prefix}/sbin
|
||
|
bindir = ${exec_prefix}/bin
|
||
|
datadir = ${prefix}/share
|
||
|
initrddir = ${sysconfdir}/rc.d/init.d
|
||
|
mandir = ${prefix}/usr/share/man
|
||
|
sysconfigdir= ${sysconfdir}/sysconfig
|
||
|
|
||
|
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
|
||
|
|
||
|
all:
|
||
|
|
||
|
install-sysconfig:
|
||
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir) $(DESTDIR)$(sysconfdir)/{cron.hourly,cron.daily,cron.weekly,sysconfig}
|
||
|
$(INSTALL_PROGRAM) etc/cron.hourly/* $(DESTDIR)$(sysconfdir)/cron.hourly/
|
||
|
$(INSTALL_PROGRAM) etc/cron.daily/* $(DESTDIR)$(sysconfdir)/cron.daily/
|
||
|
$(INSTALL_PROGRAM) etc/cron.weekly/* $(DESTDIR)$(sysconfdir)/cron.weekly/
|
||
|
$(INSTALL_PROGRAM) etc-frontend/cron.hourly/* $(DESTDIR)$(sysconfdir)/cron.hourly/
|
||
|
$(INSTALL_PROGRAM) etc-frontend/cron.weekly/* $(DESTDIR)$(sysconfdir)/cron.weekly/
|
||
|
$(INSTALL_DATA) -m600 etc/sysconfig/* $(DESTDIR)$(sysconfdir)/sysconfig/
|
||
|
|
||
|
install-usertools: $(pck_usertools)
|
||
|
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
||
|
$(INSTALL_SCRIPT) bin/* $(DESTDIR)$(sbindir)
|
||
|
|
||
|
install: install-sysconfig install-usertools
|
||
|
|
||
|
dist: clean
|
||
|
@case `sed 15q ChangeLog` in \
|
||
|
*"$(VERSION)"*) : ;; \
|
||
|
*) \
|
||
|
echo "ChangeLog not updated; not releasing" 1>&2;\
|
||
|
exit 1;; \
|
||
|
esac
|
||
|
@rm -f $(dist_archive);\
|
||
|
tar cf - --exclude=$(dist_archive) -C .. $(distdir) | \
|
||
|
bzip2 -9 -c > $(dist_archive)
|
||
|
@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:
|
||
|
@rm -f $(dist_archive)
|