2011-05-04 02:30:35 +02:00
|
|
|
# makedist Makefile for installation and packaging
|
2012-07-09 19:12:57 +02:00
|
|
|
# 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
|
2012-07-09 19:12:57 +02:00
|
|
|
sbindir := $(prefix)/sbin
|
2012-07-22 16:27:27 +02:00
|
|
|
localedir := $(datadir)/locale/
|
2012-11-29 12:37:37 +01:00
|
|
|
localstatedir := /var
|
|
|
|
makediststatedir := $(localstatedir)/makedist
|
|
|
|
recordvmstatedir := $(makediststatedir)/recordvm
|
2012-07-22 16:27:27 +02:00
|
|
|
|
|
|
|
INSTALL = /usr/bin/install
|
|
|
|
INSTALL_PROGRAM = ${INSTALL} -m 755
|
|
|
|
INSTALL_DATA = ${INSTALL} -m 644
|
|
|
|
INSTALL_DIR = ${INSTALL} -d -m 755
|
|
|
|
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
|
|
|
|
2014-05-13 11:42:41 +02:00
|
|
|
pck_catalogs := $(wildcard po/*.po)
|
2012-07-22 16:27:27 +02:00
|
|
|
|
|
|
|
.po.mo:; msgfmt $< -o $@
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .in .po .mo
|
|
|
|
|
|
|
|
locales: $(pck_catalogs:.po=.mo)
|
|
|
|
|
2012-07-27 15:12:00 +02:00
|
|
|
# TODO: test next time for integration:
|
2012-08-02 14:58:43 +02:00
|
|
|
# xgettext -j bin/makedist-announcement.sh makedist/makedist-announcement --language=shell \
|
|
|
|
# --from-code=UTF-8 -p po/it/ --package-name makedist
|
2012-07-27 15:12:00 +02:00
|
|
|
|
2012-07-22 16:27:27 +02:00
|
|
|
install-locales: locales
|
|
|
|
@install -d $(DESTDIR)$(localedir)
|
|
|
|
@for f in $(pck_catalogs); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/makedist.mo;\
|
|
|
|
done
|
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)
|
|
|
|
|
2012-07-22 16:27:27 +02:00
|
|
|
install: install-locales
|
2011-05-04 02:30:35 +02:00
|
|
|
@install -d $(DESTDIR)$(datadir);\
|
|
|
|
cp -a makedist $(DESTDIR)$(datadir)/;\
|
|
|
|
install -d $(DESTDIR)$(sysconfdir)/makedist;\
|
2012-07-14 14:10:18 +02:00
|
|
|
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;\
|
2013-01-27 16:15:30 +01:00
|
|
|
cp -a config/30-makedist-autobuild-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/30-makedist-autobuild-cleanold;\
|
2012-11-29 12:37:37 +01:00
|
|
|
install -d $(DESTDIR)$($recordvmstatedir);\
|
|
|
|
cp -a var/recordvm-xinitrc $(DESTDIR)$(recordvmstatedir)/.xinitrc;\
|
|
|
|
cp -a var/recordvm-xvidcaprc $(DESTDIR)$(recordvmstatedir)/.xvidcaprc;\
|
2014-06-24 15:58:56 +02:00
|
|
|
cp -a var/recordvm-xorg.conf $(DESTDIR)$(recordvmstatedir)/xorg.conf;\
|
2012-07-14 14:10:18 +02:00
|
|
|
install -d $(DESTDIR)$(sbindir);\
|
|
|
|
cp -a bin/makedist-recordvm $(DESTDIR)$(sbindir)/makedist-recordvm
|
|
|
|
cp -a bin/makedist-newrelease $(DESTDIR)$(sbindir)/makedist-newrelease
|
2012-07-22 16:27:27 +02:00
|
|
|
cp -a bin/makedist-announcement $(DESTDIR)$(sbindir)/makedist-announcement
|