86 lines
2.1 KiB
Makefile
86 lines
2.1 KiB
Makefile
# Makefile for openmamba initscripts
|
|
# Copyright (C) 2004-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
# 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
|
|
|
|
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
|
|
|
|
tools:
|
|
make -C src
|
|
|
|
install-tools:
|
|
make install -C src
|
|
|
|
install-dirs:
|
|
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
|
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/run
|
|
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/log
|
|
$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/modules.d/
|
|
$(INSTALL_DIR) $(DESTDIR)/var/spool/gdm
|
|
|
|
install-files:
|
|
touch $(DESTDIR)$(localstatedir)/log/{btmp,lastlog,wtmp}
|
|
cp -a etc usr $(DESTDIR)
|
|
install -d -m0755 $(DESTDIR)$(sysconfdir)/rc.d
|
|
for i in `seq 0 6`; do\
|
|
install -d -m0755 $(DESTDIR)$(sysconfdir)/rc.d/rc$$i.d;\
|
|
ln -sf rc.d/rc$$i.d/ $(DESTDIR)$(sysconfdir)/rc$$i.d;\
|
|
done
|
|
ln -sf rc.d/init.d/ $(DESTDIR)$(sysconfdir)/init.d
|
|
|
|
install: install-dirs install-tools install-files
|
|
|
|
dist: clean
|
|
@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)
|
|
@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
|