38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
# makedist Makefile for installation and packaging
|
|
# Copyright (c) 2003-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
#
|
|
# 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
|
|
|
|
dist: clean
|
|
@tar cf - --exclude=$(dist_archive) --exclude=global/defs.inc \
|
|
--exclude global/distromatic.conf -C .. $(distdir) | \
|
|
bzip2 -9 -c > $(dist_archive)
|
|
@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
|