2011-04-26 12:26:24 +02:00
|
|
|
# Makefile for openmamba initscripts
|
2013-04-14 17:09:15 +02:00
|
|
|
# Copyright (C) 2004-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
2011-04-26 12:26:24 +02:00
|
|
|
# Copyright (C) 2004-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
|
|
|
|
|
|
|
include VERSION
|
|
|
|
|
|
|
|
PACKAGE=initscripts
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
|
|
|
# package related variables
|
|
|
|
distdir = $(PACKAGE)-$(VERSION)
|
|
|
|
dist_archive = $(distdir).tar.bz2
|
|
|
|
|
|
|
|
pck_catalogs := $(wildcard po/*.po)
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .po .mo
|
|
|
|
.po.mo:; msgfmt $< -o $@
|
|
|
|
|
|
|
|
all: tools locales
|
|
|
|
|
|
|
|
locales: $(pck_catalogs:.po=.mo)
|
|
|
|
|
|
|
|
tools:
|
|
|
|
make -C src
|
|
|
|
|
|
|
|
install-locales: locales
|
|
|
|
@for f in $(pck_catalogs); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(localesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/$(PACKAGE).mo;\
|
|
|
|
done
|
|
|
|
|
|
|
|
install-tools:
|
|
|
|
make install -C src
|
|
|
|
|
|
|
|
install-dirs:
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)/sbin
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/run
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/log
|
2011-04-27 19:48:38 +02:00
|
|
|
$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/modules.d/
|
2011-11-29 01:34:02 +01:00
|
|
|
$(INSTALL_DIR) $(DESTDIR)/var/spool/gdm
|
2011-04-26 12:26:24 +02:00
|
|
|
|
|
|
|
install-files:
|
|
|
|
touch $(DESTDIR)$(localstatedir)/run/utmp
|
|
|
|
touch $(DESTDIR)$(localstatedir)/log/{btmp,lastlog,wtmp}
|
2017-12-20 22:59:05 +01:00
|
|
|
cp -a etc lib var usr $(DESTDIR)
|
2011-04-26 12:26:24 +02:00
|
|
|
$(INSTALL_SCRIPT) sbin/* $(DESTDIR)/sbin
|
|
|
|
for i in `seq 0 6`; do\
|
|
|
|
ln -sf rc.d/rc$$i.d/ $(DESTDIR)$(sysconfdir)/rc$$i.d;\
|
|
|
|
done
|
|
|
|
ln -sf rc.d/init.d/ $(DESTDIR)$(sysconfdir)/init.d
|
|
|
|
ln -sf rc.d/rcsysinit.d/ $(DESTDIR)$(sysconfdir)/rcsysinit.d
|
|
|
|
|
|
|
|
install: install-dirs install-tools install-locales install-files
|
|
|
|
|
|
|
|
dist: clean
|
2011-06-13 00:54:49 +02:00
|
|
|
@git log > ChangeLog.git
|
2011-04-27 19:48:38 +02:00
|
|
|
@mkdir /tmp/$(distdir)
|
|
|
|
@cp -a * /tmp/$(distdir)/
|
2011-04-26 12:26:24 +02:00
|
|
|
@rm -f $(dist_archive);\
|
2011-04-27 19:48:38 +02:00
|
|
|
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
|
|
|
@rm -rf /tmp/$(distdir)
|
2011-04-26 12:26:24 +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:
|
|
|
|
rm -f $(dist_archive)
|
|
|
|
rm -f $(pck_catalogs:.po=.mo)
|
|
|
|
rm -f $(PACKAGE).lang
|
|
|
|
make clean -C src
|