62 lines
1.6 KiB
Makefile
62 lines
1.6 KiB
Makefile
|
# Makefile for acpi_tables_patch
|
||
|
# Copyright (C) 2017 by Silvan Calarco <silvan.calarco@qilinux.it>
|
||
|
|
||
|
include VERSION
|
||
|
|
||
|
PACKAGE = acpi_tables_patch
|
||
|
|
||
|
prefix = /usr
|
||
|
exec_prefix = $(prefix)
|
||
|
sysconfdir = /etc
|
||
|
bindir = $(exec_prefix)/bin
|
||
|
libdir := $(prefix)/lib
|
||
|
sbindir = $(exec_prefix)/sbin
|
||
|
sbin = /sbin
|
||
|
mandir = $(prefix)/share/man
|
||
|
datadir = $(prefix)/share
|
||
|
initrddir = $(sysconfdir)/rc.d/init.d
|
||
|
logrotatedir = $(sysconfdir)/logrotate.d/
|
||
|
sysconfigdir= $(sysconfdir)/sysconfig
|
||
|
systemdunitdir = /lib/systemd/system
|
||
|
localesdir = $(datadir)/locale
|
||
|
|
||
|
srcdir = .
|
||
|
|
||
|
DESTDIR =
|
||
|
INSTALL = /usr/bin/install -c
|
||
|
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
|
||
|
|
||
|
install:
|
||
|
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
||
|
$(INSTALL_SCRIPT) acpi_tables_patch $(DESTDIR)$(sbindir)
|
||
|
$(INSTALL_DIR) $(DESTDIR)$(datadir)/acpi_tables_patch/patches/
|
||
|
cp *.patch $(DESTDIR)$(datadir)/acpi_tables_patch/patches/
|
||
|
$(INSTALL_DIR) $(DESTDIR)$(systemdunitdir)
|
||
|
$(INSTALL_DATA) acpi_tables_patch@.service $(DESTDIR)$(systemdunitdir)
|
||
|
|
||
|
dist: clean
|
||
|
@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:
|
||
|
find . -name *~ -exec rm {} \;
|
||
|
rm -f $(dist_archive)
|
||
|
rm -f $(pck_catalogs:.po=.mo)
|
||
|
rm -f $(PACKAGE).lang
|