-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
126 lines (104 loc) · 4.34 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#License: GPL
#Copyright Red Hat Inc. Oct 2006
PKGNAME=system-config-kdump
MODULENAME=system-config-kdump
VERSION=$(shell rpm -q --define 'dist %{nil}' --qf '%{version}\n' --specfile ${PKGNAME}.spec |head -1)
RELEASE=$(shell rpm -q --define 'dist %{nil}' --qf '%{release}\n' --specfile ${PKGNAME}.spec |head -1)
CVSTAG=$(PKGNAME)-$(subst .,_,$(VERSION)-$(RELEASE))
SUBDIRS=po
MANDIR=/usr/share/man
PREFIX=/usr
DATADIR=${PREFIX}/share
PKGDATADIR=${DATADIR}/${PKGNAME}
PKGIMAGESDIR=${PKGDATADIR}/images
ETC=/etc
PAMD_DIR = ${ETC}/pam.d
SECURITY_DIR = ${ETC}/security/console.apps
SERVICE_DIR = ${DATADIR}/dbus-1/system-services
SERVICE_DATA = org.fedoraproject.systemconfig.kdump.mechanism.service
CONF_DIR = ${ETC}/dbus-1/system.d
CONF_DATA = org.fedoraproject.systemconfig.kdump.mechanism.conf
POLICY_DIR = ${DATADIR}/polkit-1/actions
POLICY_DATA = org.fedoraproject.systemconfig.kdump.policy
LIBEXEC_DIR = ${PKGDATADIR}
LIBEXEC_SCRIPTS = system-config-kdump-backend.py
GLADE_DATA = *.glade
GLADE_DIR = ${PKGDATADIR}
MAKEFILE := $(lastword $(MAKEFILE_LIST))
TOPDIR := $(abspath $(dir $(abspath $(MAKEFILE))))
DOC_ABS_SRCDIR = $(TOPDIR)/help
DOC_MODULE = system-config-kdump
DOC_FIGURES_DIR = figures
DOC_FIGURES = basic.png expert.png filter.png target.png disabled.png enabled.png
DOC_ENTITIES = distro-specifics.ent system-config-kdump-distro-specifics.ent system-config-kdump-abstract.xml system-config-kdump-content.xml
DESTDIR = $(INSTROOT)
default: subdirs py-build
subdirs: doc-all
for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1; done
install: ${PKGNAME}.desktop doc-install py-install
mkdir -p $(INSTROOT)/usr/bin
mkdir -p $(INSTROOT)$(PKGDATADIR)
mkdir -p $(INSTROOT)/usr/sbin
mkdir -p $(INSTROOT)$(PAMD_DIR)
mkdir -p $(INSTROOT)$(SECURITY_DIR)
mkdir -p $(INSTROOT)$(PKGDATADIR)/pixmaps
mkdir -p $(INSTROOT)/usr/share/applications
mkdir -p $(INSTROOT)/usr/share/icons/hicolor/48x48/apps
mkdir -p ${INSTROOT}${SERVICE_DIR}
mkdir -p ${INSTROOT}${CONF_DIR}
mkdir -p ${INSTROOT}${POLICY_DIR}
mkdir -p ${INSTROOT}${LIBEXEC_DIR}
mkdir -p ${INSTROOT}${GLADE_DIR}
install -m0755 src/${PKGNAME}.py $(INSTROOT)$(PKGDATADIR)
install src/${PKGNAME} $(INSTROOT)/usr/bin
install -m644 src/${GLADE_DATA} $(INSTROOT)$(GLADE_DIR)
install -m644 pixmaps/*.png $(INSTROOT)$(PKGDATADIR)/pixmaps
install -m644 pixmaps/${PKGNAME}.png $(INSTROOT)/usr/share/icons/hicolor/48x48/apps
install -m644 ${PKGNAME}.pam $(INSTROOT)$(PAMD_DIR)/${PKGNAME}
install -m644 ${PKGNAME}.console $(INSTROOT)$(SECURITY_DIR)/${PKGNAME}
install -m644 ${PKGNAME}.desktop $(INSTROOT)/usr/share/applications/${PKGNAME}.desktop
install -m0755 src/${LIBEXEC_SCRIPTS} $(INSTROOT)${LIBEXEC_DIR}
install -m0644 ${SERVICE_DATA} $(INSTROOT)${SERVICE_DIR}
install -m0644 ${CONF_DATA} $(INSTROOT)${CONF_DIR}
install -m0644 ${POLICY_DATA} $(INSTROOT)${POLICY_DIR}
# ln -sf consolehelper $(INSTROOT)/usr/bin/${PKGNAME}
for d in $(SUBDIRS); do \
(cd $$d; $(MAKE) INSTROOT=$(INSTROOT) MANDIR=$(MANDIR) install) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
force-tag:
cvs tag -cFR $(CVSTAG) .
changelog:
@git log > ChangeLog
archive: clean changelog
@git archive --format=tar --prefix=${PKGNAME}-$(VERSION)/ HEAD > ${PKGNAME}-$(VERSION).tar
@mkdir -p ${PKGNAME}-$(VERSION)/
@cp ChangeLog ${PKGNAME}-$(VERSION)/
@tar --append -f ${PKGNAME}-$(VERSION).tar ${PKGNAME}-$(VERSION)
@bzip2 -f ${PKGNAME}-$(VERSION).tar
@rm -rf ${PKGNAME}-$(VERSION)
@echo "The archive is at ${PKGNAME}-$(VERSION).tar.bz2"
snapsrc: archive
@rpmbuild -ta $(PKGNAME)-$(VERSION).tar.bz2
selinux-module:
checkmodule -M -m -o local-system-config.mod local-system-config.te
semodule_package -o local-system-config.pp -m local-system-config.mod
semodule -i local-system-config.pp
clean: doc-clean py-clean
@rm -fv *~
@rm -fv src/*.pyc
@rm -fv src/sckdump/*.pyc
@rm -fv po/*mo po/*~ po/.depend
@rm -fv ${PKGNAME}.desktop
@rm -fv ChangeLog
@rm -fv ${PKGNAME}*.tar.bz2
srpm: archive
@echo Creating src.rpm
@mv $(PKGNAME)-$(VERSION).tar.bz2 $(HOME)/rpmbuild/SOURCES/
@cp $(PKGNAME).spec $(HOME)/rpmbuild/SPECS/
@rpmbuild --nodeps -bs $(HOME)/rpmbuild/SPECS/$(PKGNAME).spec
@echo SRPM is: $(HOME)/rpmbuild/SRPMS/$(PKGNAME)-$(VERSION)-$(RELEASE).src.rpm
%.desktop: %.desktop.in
@intltool-merge -d -u po/ $< $@
include doc_rules.mk
include py_rules.mk