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
|
# Makefile for dhelp project
# Copyright (C) 2005 Esteban Manchado Velzquez <zoso@debian.org>
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
# This file is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this file; see the file COPYING. If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
PACKAGE = dhelp
VERSION = $(shell dpkg-parsechangelog | egrep Version: | sed 's/Version: //')
PREFIX_ = $(if $(PREFIX),$(PREFIX),/usr/local)
DESTDIR_ = $(DESTDIR)/$(PREFIX_)
RHTML_TEMPLATES = *.rhtml
TMPL_TEMPLATES = *.tmpl
PERL_I18N_PROGRAMS = dsearch
all:
install:
mkdir -p $(DESTDIR_) $(DESTDIR_)/sbin $(DESTDIR_)/bin $(DESTDIR_)/lib/cgi-bin $(DESTDIR_)/share/doc/dhelp $(DESTDIR_)/share/dhelp
# Executable files
install dhelp $(DESTDIR_)/bin/dhelp
install dsearch $(DESTDIR_)/lib/cgi-bin/dsearch
install dhelp_fetcher.rb $(DESTDIR_)/lib/cgi-bin/dhelp_fetcher
install dhelp_parse.rb $(DESTDIR_)/sbin/dhelp_parse.rb
# Update PREFIX variable in dhelp_parse.rb
sed 's|^PREFIX = .*|PREFIX = "$(PREFIX_)"|' $(DESTDIR_)/sbin/dhelp_parse.rb >$(DESTDIR_)/sbin/dhelp_parse
rm -f $(DESTDIR_)/sbin/dhelp_parse.rb
chmod a+x $(DESTDIR_)/sbin/dhelp_parse
# Ruby libraries
mkdir -p $(DESTDIR_)/lib/ruby/1.8
cp -r lib/* $(DESTDIR_)/lib/ruby/1.8
# Misc files/dirs
cp *.rhtml *.tmpl swish++.conf $(DESTDIR_)/share/dhelp/
cp index-deferred $(DESTDIR_)/share/dhelp/
chmod 755 $(DESTDIR_)/share/dhelp/index-deferred
mkdir -p $(DESTDIR)/etc
cp dhelp.conf-sample $(DESTDIR)/etc/dhelp.conf
mkdir -p $(DESTDIR_)/share/dhelp/scripts
cp scripts/* $(DESTDIR_)/share/dhelp/scripts/
chmod 755 $(DESTDIR_)/share/dhelp/scripts/*
# Translations
for i in po/*.po; do \
mkdir -p $(DESTDIR_)/share/locale/`basename $$i .po`/LC_MESSAGES/; \
rmsgfmt -o $(DESTDIR_)/share/locale/`basename $$i .po`/LC_MESSAGES/dhelp.mo $$i; \
done
test:
RUBYLIB=lib:test ruby -w test/ts_dhelp.rb
updatepo: po/*.po
reportpo:
podebconf-report-po --call --withtranslators --languageteam --podir po/
po/dhelp.pot: $(RHTML_TEMPLATES) $(TMPL_TEMPLATES) $(PERL_I18N_PROGRAMS)
rgettext $(RHTML_TEMPLATES) >po/dhelp.pot
xgettext --language=c --keyword=t --join-existing -o po/dhelp.pot $(TMPL_TEMPLATES)
xgettext --language=perl --keyword=_ --join-existing -o po/dhelp.pot $(PERL_I18N_PROGRAMS)
po/%.po: po-file
msgmerge $@ po/dhelp.pot > $@.tmp
mv -f $@.tmp $@
.PHONY: install all test updatepo po-file
|