Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 54 lines (42 sloc) 1.67 kb
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
PYTHON=/usr/bin/python2.5
DESTDIR=/
BUILDIR=$(CURDIR)/debian/seriesfinale
PROJECT=seriesfinale
PO_DIR=po
LINGUAS=$(shell cat $(PO_DIR)/LINGUAS)
RESOURCES_DIR=data

all:
@echo "make source - Create source package"
@echo "make install - Install on local system"
@echo "make builddeb - Generate a deb package"
@echo "make clean - Get rid of scratch and byte files"

po/$(PROJECT).pot:
cd $(PO_DIR); intltool-update -p -g $(PROJECT)

update-po: $(PO_DIR)/$(PROJECT).pot
cd $(PO_DIR); intltool-update -r -g $(PROJECT)

%.mo : %.po
@langname=`basename $(<) .po`; \
dirname=locale/$$langname/LC_MESSAGES/; \
echo Generating $$dirname/$(PROJECT).mo; \
mkdir -p $$dirname; \
msgfmt $< -o $$dirname/$(PROJECT).mo; \

generate-mo: $(patsubst %,$(PO_DIR)/%.mo,$(LINGUAS))

$(RESOURCES_DIR)/$(PROJECT).desktop: $(RESOURCES_DIR)/$(PROJECT).desktop.in $(PO_DIR)/*.po
@intltool-merge -d $(PO_DIR) $(RESOURCES_DIR)/$(PROJECT).desktop.in $(RESOURCES_DIR)/$(PROJECT).desktop

i18n: po/$(PROJECT).pot update-po generate-mo $(RESOURCES_DIR)/$(PROJECT).desktop

source: i18n
$(PYTHON) setup.py sdist $(COMPILE)

install: i18n
$(PYTHON) setup.py install --root=$(DESTDIR) $(COMPILE)

deb: i18n
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
dpkg-buildpackage -us -uc -rfakeroot -sa

clean:
$(PYTHON) setup.py clean
rm -rf build/ locale/ MANIFEST data/seriesfinale.desktop po/seriesfinale.pot
find . -name '*.py[oc]' -exec rm {} \;
find . -name '*~' -exec rm {} \;
Something went wrong with that request. Please try again.