forked from ruxkor/checkinstall
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
71 lines (63 loc) · 1.97 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
# $Id: Makefile,v 1.6.2.1 2008/11/09 07:48:18 izto Exp $
# Where to install.
DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/sbin
LCDIR=$(PREFIX)/share/locale
CONFDIR=/etc
all:
for file in locale/checkinstall-*.po ; do \
case $${file} in \
locale/checkinstall-template.po) ;; \
*) \
out=`echo $$file | sed -s 's/po/mo/'` ; \
msgfmt -o $${out} $${file} ; \
if [ $$? != 0 ] ; then \
exit 1 ; \
fi ; \
;; \
esac ; \
done
sed 's%MAKEFILE_PREFIX%$(PREFIX)%g' checkinstall.in > checkinstall
$(MAKE) -C installwatch
install: all checkinstall checkinstallrc-dist
export
$(MAKE) -C installwatch install
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(LCDIR)
install -m 0755 -o root -g root checkinstall makepak $(DESTDIR)$(BINDIR)
for file in locale/*.mo ; do \
CKLNG=`echo $$file | sed -e 's|locale/checkinstall-||' \
-e 's|\.mo||'` && \
mkdir -p $(DESTDIR)$(LCDIR)/$${CKLNG}/LC_MESSAGES && \
install $$file $(DESTDIR)$(LCDIR)/$${CKLNG}/LC_MESSAGES/checkinstall.mo || \
exit 1 ; \
done
mkdir -p $(DESTDIR)$(CONFDIR)
install -m644 checkinstallrc-dist $(DESTDIR)$(CONFDIR)
@if ! [ -f $(DESTDIR)$(CONFDIR)/checkinstallrc ]; then \
install $(DESTDIR)$(CONFDIR)/checkinstallrc-dist $(DESTDIR)$(CONFDIR)/checkinstallrc; \
else \
echo; \
echo; \
echo ======================================================== ;\
echo; \
echo An existing checkinstallrc file has been found. ;\
echo The one from this distribution can be found at: ; \
echo; \
echo -e \\t$(DESTDIR)$(CONFDIR)/checkinstallrc-dist ; \
echo; \
echo; \
echo ======================================================== ;\
echo; \
fi
checkinstall: checkinstall.in
sed -e 's%@TEXTDOMAINDIR@%$(LCDIR)%g' -e 's%@CONFDIR@%$(CONFDIR)%g' $< > $@
checkinstallrc-dist: checkinstallrc-dist.in
sed -e 's%@PREFIX@%$(PREFIX)%g' $< >$@
clean:
for file in locale/checkinstall-*.mo checkinstall ; do \
rm -f $${file} ; \
done
rm -f checkinstall checkinstallrc-dist
$(MAKE) -C installwatch clean