APPNAME=@appname@ VERSION=@version@ PREFIX=@prefix@ MANDIR=@mandir@ DOCDIR=@docdir@ PYTHON=`which @python@` LANGUAGE_FILES=$(patsubst po/%.po, locale/%/LC_MESSAGES/$(APPNAME).mo, $(wildcard po/*.po)) DESTDIR= GIT_BRANCH := $(shell git branch --show-current) all: $(LANGUAGE_FILES) layouts intltool-merge -d po org.xfce.PanelProfiles.desktop.in org.xfce.PanelProfiles.desktop intltool-merge -x po data/metainfo/org.xfce.PanelProfiles.appdata.xml.in \ data/metainfo/org.xfce.PanelProfiles.appdata.xml chmod +x org.xfce.PanelProfiles.desktop sed -e s,%prefix%,$(PREFIX), bin/$(APPNAME).in.in > bin/$(APPNAME).in sed -e s,%python%,$(PYTHON), bin/$(APPNAME).in > bin/$(APPNAME) sed -e s,%appname%,$(APPNAME), xfce4-panel-profiles/info.py.in.in > xfce4-panel-profiles/info.py.in sed -e s,%version%,$(VERSION), xfce4-panel-profiles/info.py.in > xfce4-panel-profiles/info.py chmod +x bin/$(APPNAME) locale/%/LC_MESSAGES/$(APPNAME).mo: po/%.po mkdir -p $(dir $@) msgfmt $< -o $@ pot: cd po; intltool-update --pot --gettext-package=xfce4-panel-profiles ifeq ($(shell tar --help|grep -o sort=),sort=) TAROPTS := --sort=name --format ustar endif layouts: cd data/layouts/cupertino; tar $(TAROPTS) -cvjf "../Cupertino.tar.bz2" * cd data/layouts/gnome2; tar $(TAROPTS) -cvjf "../GNOME 2.tar.bz2" * cd data/layouts/redmond; tar $(TAROPTS) -cvjf "../Redmond.tar.bz2" * cd data/layouts/redmond7; tar $(TAROPTS) -cvjf "../Redmond 7.tar.bz2" * cd data/layouts/xfce-4.12; tar $(TAROPTS) -cvjf "../Xfce 4.12.tar.bz2" * cd data/layouts/xfce-4.14; tar $(TAROPTS) -cvjf "../Xfce 4.14.tar.bz2" * cd data/layouts/xfce-4.16; tar $(TAROPTS) -cvjf "../Xfce 4.16.tar.bz2" * cd data/layouts/xubuntu-12.04; tar $(TAROPTS) -cvjf "../Xubuntu 12.04 (Precise).tar.bz2" * cd data/layouts/xubuntu-14.04; tar $(TAROPTS) -cvjf "../Xubuntu 14.04 (Trusty).tar.bz2" * cd data/layouts/xubuntu-18.04; tar $(TAROPTS) -cvjf "../Xubuntu 18.04 (Bionic).tar.bz2" * cd data/layouts/openSUSE-Leap-15.x; tar $(TAROPTS) -cvjf "../openSUSE Leap 15.x.tar.bz2" * install: all xfce4-panel-profiles.1 install -d $(DESTDIR)/$(PREFIX)/bin install bin/$(APPNAME) $(DESTDIR)/$(PREFIX)/bin install -d $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/xfce4-panel-profiles install xfce4-panel-profiles/info.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/xfce4-panel-profiles install xfce4-panel-profiles/panelconfig.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/xfce4-panel-profiles install xfce4-panel-profiles/xfce4-panel-profiles.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/xfce4-panel-profiles install xfce4-panel-profiles/xfce4-panel-profiles.glade $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/xfce4-panel-profiles install -d $(DESTDIR)/$(DOCDIR) install AUTHORS $(DESTDIR)/$(DOCDIR) install COPYING $(DESTDIR)/$(DOCDIR) install NEWS $(DESTDIR)/$(DOCDIR) install INSTALL $(DESTDIR)/$(DOCDIR) install README.md $(DESTDIR)/$(DOCDIR) install -d $(DESTDIR)/$(PREFIX)/share/applications install -m 644 org.xfce.PanelProfiles.desktop $(DESTDIR)/$(PREFIX)/share/applications install -d $(DESTDIR)/$(PREFIX)/share/xfce4-panel-profiles install -d $(DESTDIR)/$(PREFIX)/share/xfce4-panel-profiles/layouts install data/layouts/*.tar.bz2 $(DESTDIR)/$(PREFIX)/share/xfce4-panel-profiles/layouts install -d $(DESTDIR)/$(PREFIX)/share/metainfo install data/metainfo/*.xml $(DESTDIR)/$(PREFIX)/share/metainfo cp -rf locale $(DESTDIR)/$(PREFIX)/share ln -sf $(PREFIX)/share/locale $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/locale install -d $(DESTDIR)/$(MANDIR)/man1 install xfce4-panel-profiles.1 $(DESTDIR)/$(MANDIR)/man1 install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/128x128/apps install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/48x48/apps install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/16x16/apps install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/scalable/apps install data/icons/128x128/org.xfce.PanelProfiles.png $(DESTDIR)/$(PREFIX)/share/icons/hicolor/128x128/apps install data/icons/48x48/org.xfce.PanelProfiles.png $(DESTDIR)/$(PREFIX)/share/icons/hicolor/48x48/apps install data/icons/16x16/org.xfce.PanelProfiles.png $(DESTDIR)/$(PREFIX)/share/icons/hicolor/16x16/apps install data/icons/scalable/org.xfce.PanelProfiles.svg $(DESTDIR)/$(PREFIX)/share/icons/hicolor/scalable/apps uninstall: rm -f $(DESTDIR)/$(PREFIX)/share/applications/org.xfce.PanelProfiles.desktop rm -rf $(DESTDIR)/$(PREFIX)/share/$(APPNAME) rm -rf $(DESTDIR)/$(DOCDIR) # FIXME: Uninstall locales rm -f $(DESTDIR)/$(PREFIX)/bin/$(APPNAME) rm -rf $(DESTDIR)/$(PREFIX)/share/icons/hicolor/128x128/apps rm -rf $(DESTDIR)/$(PREFIX)/share/icons/hicolor/48x48/apps rm -rf $(DESTDIR)/$(PREFIX)/share/icons/hicolor/16x16/apps rm -rf $(DESTDIR)/$(PREFIX)/share/icons/hicolor/scalable/apps/org.xfce.PanelProfiles.svg distcheck: all mkdir -p $(APPNAME)-$(VERSION) for filename in `git ls-tree -r $(GIT_BRANCH) --name-only | grep -v git`; do \ mkdir -p $(APPNAME)-$(VERSION)/`dirname $$filename`; \ cp $$filename $(APPNAME)-$(VERSION)/$$filename; \ done; git log > $(APPNAME)-$(VERSION)/ChangeLog tar -cvjSf $(APPNAME)-$(VERSION).tar.bz2 $(APPNAME)-$(VERSION) rm -rf $(APPNAME)-$(VERSION) clean: rm -Rf locale rm -f xfce4-panel-profiles/*.pyc rm -f bin/$(APPNAME).in rm -f bin/$(APPNAME) rm -f data/metainfo/org.xfce.PanelProfiles.appdata.xml rm -f data/layouts/*.tar.bz2 rm -f data/icons/128x128/org.xfce.panelprofiles.png rm -f data/icons/48x48/org.xfce.panelprofiles.png rm -f data/icons/16x16/org.xfce.panelprofiles.png rm -f data/icons/scalable/org.xfce.panelprofiles.svg rm -f org.xfce.PanelProfiles.desktop rm -f Makefile.in rm -f Makefile rm -f xfce4-panel-profiles/info.py rm -f xfce4-panel-profiles/info.py.in