forked from github/kensanata.oddmuse
76 lines
2.2 KiB
Makefile
76 lines
2.2 KiB
Makefile
# The Makefile is only for developpers wanting to prepare the tarball.
|
|
# Make sure the CVS keywords for the sed command on the next line are not expanded.
|
|
|
|
VERSION=oddmuse-$(shell sed -n -e 's/^.*\$$Id: wiki\.pl,v \([0-9.]*\).*$$/\1/p' wiki.pl)
|
|
TRANSLATIONS=$(wildcard modules/translations/[a-z]*-utf8.pl$)
|
|
MODULES=$(wildcard modules/*.pl)
|
|
|
|
dist: $(VERSION).tar.gz
|
|
|
|
upload: $(VERSION).tar.gz $(VERSION).tar.gz.sig
|
|
curl -T $(VERSION).tar.gz ftp://savannah.gnu.org/incoming/savannah/oddmuse/
|
|
curl -T $(VERSION).tar.gz.sig ftp://savannah.gnu.org/incoming/savannah/oddmuse/
|
|
|
|
upload-text: new-utf8.pl
|
|
wikiupload new-utf8.pl http://www.oddmuse.org/cgi-bin/oddmuse-en/New_Translation_File
|
|
|
|
$(VERSION).tar.gz:
|
|
rm -rf $(VERSION)
|
|
mkdir $(VERSION)
|
|
cp README FDL GPL ChangeLog wiki.pl $(TRANSLATIONS) $(MODULES) $(VERSION)
|
|
tar czf $(VERSION).tar.gz $(VERSION)
|
|
|
|
%.tar.gz.sig: %.tar.gz
|
|
gpg --sign -b $<
|
|
|
|
# 1. update-translations (will fetch input from the wiki, and updates files)
|
|
# 2. check changes, cvs commit
|
|
# 3. upload-translations (will verify cvs status, upload scripts, and upload pages)
|
|
|
|
update-translations: always
|
|
for f in $(TRANSLATIONS); do \
|
|
echo $$f...; \
|
|
sleep 5; \
|
|
make $$f; \
|
|
done
|
|
|
|
upload-translations: always
|
|
for f in $(TRANSLATIONS); do \
|
|
cvs status $$f | grep 'Status: Up-to-date'; \
|
|
wikiput -u cvs -s update http://www.oddmuse.org/cgi-bin/oddmuse/raw/$$f < $$f; \
|
|
cgi-upload $$f; \
|
|
done
|
|
|
|
%-utf8.pl: always
|
|
f=`basename $@` && wget -q http://www.oddmuse.org/cgi-bin/oddmuse/raw/$$f -O $@.wiki
|
|
grep '^\(#\|\$$\)' $@.wiki > $@-new
|
|
perl oddtrans -l $@ -l $@.wiki wiki.pl $(MODULES) >> $@-new && mv $@-new $@
|
|
|
|
.PHONY: always
|
|
|
|
deb:
|
|
equivs-build control
|
|
|
|
install:
|
|
@echo This only installs the deb file, not the script itself.
|
|
dpkg -i oddmuse*.deb
|
|
|
|
test:
|
|
perl test.pl
|
|
|
|
fix:
|
|
perl test.pl -x
|
|
|
|
package-upload: debian-$(VERSION).tar.gz debian-$(VERSION).tar.gz.sig
|
|
curl -T "{debian-$(VERSION).tar.gz,debian-$(VERSION).tar.gz.sig}" \
|
|
ftp://savannah.gnu.org/incoming/savannah/oddmuse/
|
|
|
|
package: debian-$(VERSION).tar.gz
|
|
gpg --ascii --encrypt $<
|
|
|
|
debian-$(VERSION).tar.gz:
|
|
rm -rf $(VERSION)
|
|
mkdir $(VERSION)
|
|
cp README FDL GPL wiki.pl $(VERSION)
|
|
tar czf $@ $(VERSION)
|