Blame
Date:
Thu Oct 30 22:40:48 2014 UTC
Message:
Update README.rst
01
2014-08-18
alienus
NAME=lfstools
02
2014-08-18
alienus
VERSION=0.6
03
2014-08-18
alienus
PKG_NAME=$(NAME)-$(VERSION)
04
2014-08-18
alienus
05
2014-08-18
alienus
PREFIX?=/usr
06
2014-08-18
alienus
DESTDIR?=
07
2014-08-18
alienus
08
2014-08-18
alienus
PORT?=
09
2014-08-18
alienus
USER?=
10
2014-08-18
alienus
SERVER?=
11
2014-08-18
alienus
12
2014-08-31
alienus
RST2MAN=/usr/bin/rst2man.py
13
2014-08-18
alienus
14
2014-08-18
alienus
LFSTOOLSDIR=$(PREFIX)/share/lfstools
15
2014-08-18
alienus
16
2014-09-03
alienus
SBIN=service servicesetup keyboardsetup localesetup
17
2014-09-03
alienus
MAND=service/man servicesetup/man keyboardsetup/man localesetup/man
18
2014-09-03
alienus
MANFF=service.8 servicesetup.8 keyboardsetup.8 localesetup.8
19
2014-08-18
alienus
SERVICEPO=service/po
20
2014-08-18
alienus
SERVICESETUPPO=servicesetup/po
21
2014-08-18
alienus
KEYBOARDSETUPPO=keyboardsetup/po
22
2014-09-03
alienus
LOCALESETUPPO=localesetup/po
23
2014-09-03
alienus
POD=$(SERVICEPO) $(SERVICESETUPPO) $(KEYBOARDSETUPPO) $(LOCALESETUPPO)
24
2014-09-03
alienus
MOFF=fr.mo
25
2014-08-18
alienus
26
2014-08-18
alienus
POF:=$(foreach dir,$(POD),$(wildcard $(dir)/*.po))
27
2014-08-31
alienus
MANF:=$(foreach dir,$(MAND),$(wildcard $(dir)/*.rst))
28
2014-08-18
alienus
MAN8:=$(foreach dir,$(MAND),$(wildcard $(dir)/*.8))
29
2014-08-18
alienus
SMO:=$(foreach dir,$(SERVICEPO),$(wildcard $(dir)/*.mo))
30
2014-08-18
alienus
SSMO:=$(foreach dir,$(SERVICESETUPPO),$(wildcard $(dir)/*.mo))
31
2014-08-18
alienus
KMO:=$(foreach dir,$(KEYBOARDSETUPPO),$(wildcard $(dir)/*.mo))
32
2014-08-18
alienus
33
2014-08-18
alienus
34
2014-08-18
alienus
help:
35
2014-08-18
alienus
@echo 'LFStools Makefile '
36
2014-08-18
alienus
@echo ' '
37
2014-08-18
alienus
@echo 'Usage: '
38
2014-08-18
alienus
@echo ' make locale generate the locale (.mo) '
39
2014-08-18
alienus
@echo ' make man generate the man page (.8) '
40
2014-08-18
alienus
@echo ' make clean remove man .8 pages and locale .mo files '
41
2014-08-18
alienus
@echo ' make install install LFStool to DESTDIR/PREFIX '
42
2014-08-18
alienus
@echo ' make uninstall remove lfstools from your system '
43
2014-08-18
alienus
@echo ' make tarball compress the source directory '
44
2014-08-18
alienus
@echo ' make tag git tag vVERSION & push '
45
2014-08-18
alienus
@echo ' make release make tarball & upload to your server '
46
2014-08-18
alienus
47
2014-08-18
alienus
locale:
48
2014-08-18
alienus
for i in $(POF); do msgfmt $$i -o `echo $$i | sed "s/\.po//"`.mo ; done
49
2014-08-18
alienus
@echo 'Done, locale files have been generated.'
50
2014-08-18
alienus
51
2014-08-18
alienus
man:
52
2014-08-31
alienus
for m in $(MANF); do $(RST2MAN) $$m `echo $$m | sed "s/\.rst//"`.8 ; done
53
2014-08-18
alienus
@echo 'Done, man pages have been generated.'
54
2014-08-18
alienus
55
2014-08-18
alienus
clean:
56
2014-08-18
alienus
for c in $(POM); do rm $$c ; done
57
2014-08-18
alienus
for d in $(MAN8); do rm $$d ; done
58
2014-08-18
alienus
@echo 'Done, source dir have been cleaned up.'
59
2014-08-18
alienus
60
2014-08-18
alienus
install:
61
2014-08-18
alienus
install -Dm755 service/service $(DESTDIR)/$(PREFIX)/sbin/service
62
2014-08-18
alienus
install -Dm644 service/blacklist.service $(DESTDIR)/$(LFSTOOLSDIR)/service/blacklist.service
63
2014-08-18
alienus
install -Dm644 service/services.txt $(DESTDIR)/$(LFSTOOLSDIR)/service/services.txt
64
2014-08-18
alienus
install -Dm755 servicesetup/servicesetup $(DESTDIR)/$(PREFIX)/sbin/servicesetup
65
2014-08-18
alienus
install -Dm755 keyboardsetup/keyboardsetup $(DESTDIR)/$(PREFIX)/sbin/keyboardsetup
66
2014-08-18
alienus
install -Dm644 keyboardsetup/numlock $(DESTDIR)/etc/rc.d/init.d/numlock
67
2014-08-18
alienus
install -Dm644 keyboardsetup/20-keymap.conf-template $(DESTDIR)/$(LFSTOOLSDIR)/keyboardsetup/20-keymap.conf-template
68
2014-08-18
alienus
install -Dm644 keyboardsetup/keymaps $(DESTDIR)/$(LFSTOOLSDIR)/keyboardsetup/keymaps
69
2014-09-03
alienus
for ma in $(MAND); do cd $$ma ; for f in $(MANFF) ; do install -Dm644 $$f $(DESTDIR)/$(PREFIX)/share/man/man8/$$f ; done ; cd - ; done
70
2014-09-03
alienus
for po in $(POD); do cd $$po ; for p in $(MOFF) ; do install -Dm644 $$p $(DESTDIR)/$(PREFIX)/share/locale/`echo $$p | sed "s/.mo//"`/LC_MESSAGES/$$po.mo ; done ; cd - ; done
71
2014-08-18
alienus
72
2014-08-18
alienus
uninstall:
73
2014-08-18
alienus
for bin in $(SBIN); do rm $(DESTDIR)/$(PREFIX)/sbin/$$bin; done
74
2014-08-18
alienus
rm $(DESTDIR)/etc/rc.d/init.d/numlock
75
2014-08-18
alienus
rm -rf $(DESTDIR)/$(LFSTOOLSDIR)
76
2014-09-03
alienus
for l in $(SBIN); do rm -rf $(DESTDIR)/$(PREFIX)/share/locale/fr/LC8MESSAGES/$$l ; done
77
2014-09-03
alienus
for m in $(SBIN); do rm $(DESTDIR)/$(PREFIX)/share/man/man8/$$m.8 ; done
78
2014-08-18
alienus
@echo 'Done, LFStools have been removed from your system.'
79
2014-08-18
alienus
80
2014-08-18
alienus
tarball:
81
2014-08-18
alienus
test -d $(PKG_NAME) || rm -rf $(PKG_NAME)
82
2014-08-18
alienus
test -f $(PKG_NAME).tar.gz || rm $(PKG_NAME).tar.gz
83
2014-08-18
alienus
git log > ChangeLog
84
2014-08-18
alienus
git archive --format=tar --prefix=$(PKG_NAME)/ HEAD | tar -x
85
2014-08-18
alienus
tar czvf $(PKG_NAME).tar.gz $(PKG_NAME)
86
2014-08-18
alienus
rm -rf $(PKG_NAME)
87
2014-08-18
alienus
@echo 'Done, tarball made.'
88
2014-08-18
alienus
89
2014-08-18
alienus
tag:
90
2014-08-18
alienus
git tag v$(VERSION)
91
2014-08-18
alienus
git push --tags
92
2014-08-18
alienus
93
2014-08-18
alienus
release: tarball
94
2014-08-18
alienus
scp -r -p -P $(PORT) $(PKG_NAME).tar.gz $(USER)@$(SERVER)
95
2014-08-18
alienus
96
2014-08-18
alienus
.PHONY: help locale man clean install uninstall tarball tag release
Frédéric Galusik