2011-11-09 22:55:09 +01:00
|
|
|
# Makefile del programma usbinstall
|
|
|
|
# Linguaggi: python, bash
|
2011-11-09 22:51:07 +01:00
|
|
|
|
|
|
|
|
2011-11-09 22:55:09 +01:00
|
|
|
PACKAGE := usbinstall
|
|
|
|
|
2011-11-10 19:15:32 +01:00
|
|
|
include VERSION
|
|
|
|
|
2011-11-09 22:55:09 +01:00
|
|
|
distdir := $(PACKAGE)-$(VERSION)
|
|
|
|
dist_archive := $(distdir).tar.bz2
|
2011-11-09 22:51:07 +01:00
|
|
|
|
2011-11-09 22:55:09 +01:00
|
|
|
# Directory
|
|
|
|
bindir := /usr/bin
|
2012-01-08 19:01:44 +01:00
|
|
|
sbindir := /usr/sbin
|
2012-01-07 20:52:28 +01:00
|
|
|
sysconfdir := /etc
|
2011-11-09 22:55:09 +01:00
|
|
|
datadir := /usr/share
|
2012-02-20 02:31:57 +01:00
|
|
|
mambadir := ${datadir}/openmamba
|
|
|
|
polkitdir := ${datadir}/polkit-1/actions
|
|
|
|
dbussystemdir := ${sysconfdir}/dbus-1/system.d
|
2011-11-09 22:55:09 +01:00
|
|
|
localesdir := ${datadir}/locale
|
|
|
|
|
|
|
|
DESTDIR :=
|
|
|
|
INSTALL := /usr/bin/install
|
|
|
|
INSTALL_PROGRAM := ${INSTALL} -m 755
|
|
|
|
INSTALL_DATA := ${INSTALL} -m 644
|
|
|
|
INSTALL_DIR := ${INSTALL} -d -m 755
|
|
|
|
INSTALL_SCRIPT := ${INSTALL_PROGRAM}
|
2011-11-09 22:51:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
pck_catalogs := $(wildcard po/*.po)
|
|
|
|
|
|
|
|
.SUFFIXES: .po .mo
|
|
|
|
.po.mo:; msgfmt $< -o $@
|
|
|
|
|
|
|
|
all: locales
|
|
|
|
|
|
|
|
locales: $(pck_catalogs:.po=.mo)
|
|
|
|
|
|
|
|
install-locales: locales
|
|
|
|
@for f in $(pck_catalogs); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(localesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
2011-11-09 22:55:09 +01:00
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/usbinstall.mo;\
|
2011-11-09 22:51:07 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
install-dirs:
|
2012-01-09 14:27:23 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
2011-11-09 22:55:09 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambadir)/usbinstall
|
2012-02-18 19:07:03 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(datadir)/applications
|
2011-11-09 22:55:09 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambadir)/usbinstall/img
|
2012-02-19 17:40:00 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(polkitdir)
|
2012-02-20 02:31:57 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(dbussystemdir)
|
2011-11-09 22:55:09 +01:00
|
|
|
|
|
|
|
install: install-dirs install-locales
|
2012-01-09 14:31:16 +01:00
|
|
|
$(INSTALL_PROGRAM) src/usbinstall.py $(DESTDIR)$(mambadir)/usbinstall/usbinstall.py
|
2012-01-08 19:01:44 +01:00
|
|
|
$(INSTALL_SCRIPT) src/usbinstall.sh $(DESTDIR)$(sbindir)/usbinstall
|
2011-11-09 22:55:09 +01:00
|
|
|
$(INSTALL_DATA) src/fdisk_template $(DESTDIR)$(mambadir)/usbinstall/fdisk_template
|
2011-11-10 19:15:32 +01:00
|
|
|
$(INSTALL_DATA) src/img/*.png $(DESTDIR)$(mambadir)/usbinstall/img/
|
2012-02-19 17:40:00 +01:00
|
|
|
$(INSTALL_DATA) src/org.openmamba.usbinstall.policy $(DESTDIR)$(polkitdir)/org.openmamba.usbinstall.policy
|
2012-02-20 02:31:57 +01:00
|
|
|
$(INSTALL_DATA) src/org.openmamba.usbinstall.conf $(DESTDIR)$(dbussystemdir)/org.openmamba.usbinstall.conf
|
2012-02-18 19:07:03 +01:00
|
|
|
$(INSTALL_DATA) src/usbinstall.desktop $(DESTDIR)$(datadir)/applications/usbinstall.desktop
|
2011-11-09 22:51:07 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(pck_catalogs:.po=.mo)
|
|
|
|
rm -f $(dist_archive)
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
#@git clean -f
|
|
|
|
#@git log > ChangeLog
|
|
|
|
@mkdir /tmp/$(distdir)
|
|
|
|
@cp -a * /tmp/$(distdir)/
|
|
|
|
@rm -f $(dist_archive);\
|
|
|
|
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
|
|
|
@rm -rf /tmp/$(distdir)
|
|
|
|
@echo "file \`$(dist_archive)' created"
|
|
|
|
|
|
|
|
dist-rpm: dist
|
|
|
|
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
|
|
|
|
mv -f $(PACKAGE)-$(VERSION).tar.bz2 $$rpm_sourcedir;\
|
|
|
|
echo "File $$rpm_sourcedir/$(PACKAGE)-$(VERSION).tar.bz2 created."
|