diff options
-rw-r--r-- | Makefile.in | 8 | ||||
-rw-r--r-- | bin/quilt.in | 2 | ||||
-rw-r--r-- | po/Makefile | 11 | ||||
-rw-r--r-- | quilt.spec.in | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in index a8326e3..c0c5e43 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,6 +10,7 @@ libdir := @libdir@ datadir := @datadir@ mandir := $(datadir)/man docdir := $(datadir)/doc/packages +localedir := $(datadir)/locale QUILT_DIR = $(datadir)/$(PACKAGE) SCRIPTS_DIR = $(QUILT_DIR)/scripts @@ -71,7 +72,8 @@ DEBIAN := changelog control copyright docs prerm rules SRC += $(DEBIAN:%=debian/%) -PO := Makefile fr.po quilt.pot +LINGUAS := fr de +PO := Makefile quilt.pot $(LINGUAS:%=%.po) SRC += $(PO:%=po/%) #----------------------------------------------------------------------- @@ -185,7 +187,9 @@ install : scripts @INSTALL@ -d $(BUILD_ROOT)$(mandir)/man1 @INSTALL@ -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/ - BUILD_ROOT=$(BUILD_ROOT) $(MAKE) -C po install + $(MAKE) -C po install BUILD_ROOT=$(BUILD_ROOT) \ + LINGUAS="$(LINGUAS)" localedir=$(localedir) + clean : rm -f $(DIRT) diff --git a/bin/quilt.in b/bin/quilt.in index 6f8861e..872bfe9 100644 --- a/bin/quilt.in +++ b/bin/quilt.in @@ -80,7 +80,7 @@ then command="${commands[0]}" unset commands else - echo $"$command:" "${commands[@]}" >&2 + echo "$command :" "${commands[@]}" >&2 exit 1 fi fi diff --git a/po/Makefile b/po/Makefile index fd880c4..96cc828 100644 --- a/po/Makefile +++ b/po/Makefile @@ -7,8 +7,10 @@ TO_PARSE= $(foreach f,$(QUILT_IN),../quilt/$(f).in) \ $(foreach f,$(SCRIPTS_IN),../scripts/$(f).in) \ ../bin/quilt.in +# LINGUAS = ... +# localedir = ... -all: fr.mo +all: $(LINGUAS:%=%.mo) %.mo : %.po msgfmt --statistics -o $@ $< @@ -28,7 +30,10 @@ clean: rm -f *.mo *~ install: all - install -d $(BUILD_ROOT)/usr/share/locale/fr/LC_MESSAGES - install -m644 fr.mo $(BUILD_ROOT)/usr/share/locale/fr/LC_MESSAGES/quilt.mo + for lang in $(LINGUAS) ; do \ + install -d $(BUILD_ROOT)$(localedir)/$$lang/LC_MESSAGES ; \ + install -m 644 $$lang.mo \ + $(BUILD_ROOT)$(localedir)/$$lang/LC_MESSAGES/quilt.mo ; \ + done .PHONY: install clean all diff --git a/quilt.spec.in b/quilt.spec.in index ea4c1be..5411bd0 100644 --- a/quilt.spec.in +++ b/quilt.spec.in @@ -47,6 +47,8 @@ make install prefix=/usr BUILD_ROOT=$RPM_BUILD_ROOT /usr/share/quilt/ /usr/lib/quilt/ +/usr/share/locale/ + %doc /usr/share/man/man1/guards.1.gz %doc doc/README |