makedist/Makefile

49 lines
1.6 KiB
Makefile
Raw Normal View History

2011-05-04 02:30:35 +02:00
# makedist Makefile for installation and packaging
# Copyright (c) 2003-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
2011-05-04 02:30:35 +02:00
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
include makedist/VERSION
package = makedist
distdir = $(package)-$(makedist_version)
dist_archive = $(package)-$(makedist_version).tar.bz2
prefix := /usr
datadir := $(prefix)/share
sysconfdir := /etc
sbindir := $(prefix)/sbin
2011-05-04 02:30:35 +02:00
dist: clean
2011-09-09 23:01:48 +02:00
@git log > ChangeLog.git
@mkdir /tmp/$(distdir)
cp -a * /tmp/$(distdir)/
@rm -f $(dist_archive)
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
@rm -rf /tmp/$(distdir)
2011-05-04 02:30:35 +02:00
@echo "file \`$(dist_archive)' created"
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f $(package)-$(makedist_version).tar.bz2 $$rpm_sourcedir;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
clean:
@rm -fr $(dist_archive)
install:
@install -d $(DESTDIR)$(datadir);\
cp -a makedist $(DESTDIR)$(datadir)/;\
install -d $(DESTDIR)$(sysconfdir)/makedist;\
cp -a config/config $(DESTDIR)$(sysconfdir)/makedist/config;\
install -d $(DESTDIR)$(sysconfdir)/sysconfig;\
cp -a config/makedist $(DESTDIR)$(sysconfdir)/sysconfig/makedist;\
install -d $(DESTDIR)$(sysconfdir)/cron.daily;\
cp -a config/20-makedist-autobuild $(DESTDIR)$(sysconfdir)/cron.daily/20-makedist-autobuild;\
install -d $(DESTDIR)$(sbindir);\
cp -a bin/makedist-recordvm $(DESTDIR)$(sbindir)/makedist-recordvm
cp -a bin/makedist-newrelease $(DESTDIR)$(sbindir)/makedist-newrelease