From 84bd81d4178fa13a10096b4f5923b8a7e82a0074 Mon Sep 17 00:00:00 2001 From: guinux Date: Fri, 26 Feb 2016 11:36:50 +0100 Subject: [PATCH] add install localtion variables in Makefile --- Makefile | 98 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 34684f4..850939c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,12 @@ +prefix ?= /usr +bindir := $(prefix)/bin +libdir := $(prefix)/lib +includedir := $(prefix)/include +datadir := $(prefix)/share +localedir := $(datadir)/locale +sysconfdir ?= /etc + all: cd resources && make resources cd src && make binaries @@ -11,46 +19,54 @@ clean: rm -f data/polkit/org.manjaro.pamac.policy install: - mkdir -p /usr/share/icons/hicolor - cp -r data/icons/* /usr/share/icons/hicolor - cp -r po/locale /usr/share - install -Dm744 src/pamac-daemon /usr/bin/pamac-daemon - install -Dm755 src/pamac-tray /usr/bin/pamac-tray - install -Dm644 src/pamac.h /usr/include/pamac.h - install -Dm644 src/pamac.vapi /usr/share/vala/vapi/pamac.vapi - install -Dm755 src/libpamac.so /usr/lib/libpamac.so - install -Dm755 src/pamac-manager /usr/bin/pamac-manager - install -Dm755 src/pamac-updater /usr/bin/pamac-updater - install -Dm755 src/pamac-install /usr/bin/pamac-install - install -Dm755 src/pamac-refresh /usr/bin/pamac-refresh - install -Dm755 src/pamac-install /usr/bin/pamac-install - install -Dm644 data/applications/pamac-tray.desktop /etc/xdg/autostart/pamac-tray.desktop - install -Dm644 data/applications/pamac-manager.desktop /usr/share/applications/pamac-manager.desktop - install -Dm644 data/applications/pamac-updater.desktop /usr/share/applications/pamac-updater.desktop - install -Dm644 data/applications/pamac-install.desktop /usr/share/applications/pamac-install.desktop - install -Dm644 data/config/pamac.conf /etc/pamac.conf - install -Dm644 data/dbus/org.manjaro.pamac.conf /etc/dbus-1/system.d/org.manjaro.pamac.conf - install -Dm644 data/dbus/org.manjaro.pamac.service /usr/share/dbus-1/system-services/org.manjaro.pamac.service - install -Dm644 data/systemd/pamac.service /usr/lib/systemd/system/pamac.service - install -Dm744 data/networkmanager/99_update_pamac_tray /etc/NetworkManager/dispatcher.d/99_update_pamac_tray - install -Dm644 data/polkit/org.manjaro.pamac.policy /usr/share/polkit-1/actions/org.manjaro.pamac.policy - install -Dm644 data/mime/x-alpm-package.xml /usr/share/mime/packages/x-alpm-package.xml + mkdir -p $(prefix)/share/icons/hicolor + cp -r data/icons/* $(prefix)/share/icons/hicolor + mkdir -p $(localedir) + cp -r po/locale/* $(localedir) + install -Dm644 src/pamac.h $(includedir)/pamac.h + install -Dm644 src/pamac.vapi $(datadir)/vala/vapi/pamac.vapi + install -Dm755 src/libpamac.so $(libdir)/libpamac.so + install -Dm744 src/pamac-daemon $(bindir)/pamac-daemon + install -Dm755 src/pamac-tray $(bindir)/pamac-tray + install -Dm755 src/pamac-manager $(bindir)/pamac-manager + install -Dm755 src/pamac-updater $(bindir)/pamac-updater + install -Dm755 src/pamac-install $(bindir)/pamac-install + install -Dm755 src/pamac-refresh $(bindir)/pamac-refresh + install -Dm644 data/applications/pamac-tray.desktop $(sysconfdir)/xdg/autostart/pamac-tray.desktop + install -Dm644 data/applications/pamac-manager.desktop $(datadir)/applications/pamac-manager.desktop + install -Dm644 data/applications/pamac-updater.desktop $(datadir)/applications/pamac-updater.desktop + install -Dm644 data/applications/pamac-install.desktop $(datadir)/applications/pamac-install.desktop + install -Dm644 data/config/pamac.conf $(sysconfdir)/pamac.conf + install -Dm644 data/dbus/org.manjaro.pamac.conf $(sysconfdir)/dbus-1/system.d/org.manjaro.pamac.conf + install -Dm644 data/dbus/org.manjaro.pamac.service $(datadir)/dbus-1/system-services/org.manjaro.pamac.service + install -Dm644 data/systemd/pamac.service $(libdir)/systemd/system/pamac.service + install -Dm744 data/networkmanager/99_update_pamac_tray $(sysconfdir)/NetworkManager/dispatcher.d/99_update_pamac_tray + install -Dm644 data/polkit/org.manjaro.pamac.policy $(datadir)/polkit-1/actions/org.manjaro.pamac.policy + install -Dm644 data/mime/x-alpm-package.xml $(datadir)/mime/packages/x-alpm-package.xml uninstall: - rm -f /usr/share/icons/16x16/apps/system-software-install.png - rm -f /usr/share/icons/24x24/status/pamac-tray-no-update.png - rm -f /usr/share/icons/24x24/status/pamac-tray-update.png - rm -f /usr/share/icons/32x32/apps/system-software-install.png - rm -f /usr/share/locale/*/LC_MESSAGES/pamac.mo - rm -f /usr/include/pamac.h - rm -f /usr/share/vala/vapi/pamac.vapi - rm -f /usr/lib/libpamac.so - rm -f /usr/bin/pamac-daemon /usr/bin/pamac-updater /usr/bin/pamac-tray /usr/bin/pamac-manager /usr/bin/pamac-install - rm -f /etc/xdg/autostart/pamac-tray.desktop - rm -f /usr/share/applications/pamac-manager.desktop /usr/share/applications/pamac-updater.desktop /usr/share/applications/pamac-install.desktop - rm -f /etc/pamac.conf - rm -f /etc/dbus-1/system.d/org.manjaro.pamac.conf - rm -f /usr/share/dbus-1/system-services/org.manjaro.pamac.service - rm -f /usr/lib/systemd/system/pamac.service - rm -f /usr/share/polkit-1/actions/org.manjaro.pamac.policy - rm -f /usr/share/mime/packages/x-alpm-package.xml + rm -f $(datadir)/icons/hicolor/16x16/apps/system-software-install.png + rm -f $(datadir)/icons/hicolor/24x24/status/pamac-tray-no-update.png + rm -f $(datadir)/icons/hicolor/24x24/status/pamac-tray-update.png + rm -f $(datadir)/icons/hicolor/32x32/apps/system-software-install.png + rm -f $(datadir)/locale/*/LC_MESSAGES/pamac.mo + rm -f $(includedir)/pamac.h + rm -f $(datadir)/vala/vapi/pamac.vapi + rm -f $(libdir)/libpamac.so + rm -f $(bindir)/pamac-daemon + rm -f $(bindir)/pamac-tray + rm -f $(bindir)/pamac-manager + rm -f $(bindir)/pamac-updater + rm -f $(bindir)/pamac-install + rm -f $(bindir)/pamac-refresh + rm -f $(sysconfdir)/xdg/autostart/pamac-tray.desktop + rm -f $(datadir)/applications/pamac-manager.desktop + rm -f $(datadir)/applications/pamac-updater.desktop + rm -f $(datadir)/applications/pamac-install.desktop + rm -f $(sysconfdir)/pamac.conf + rm -f $(sysconfdir)/dbus-1/system.d/org.manjaro.pamac.conf + rm -f $(datadir)/dbus-1/system-services/org.manjaro.pamac.service + rm -f $(libdir)/systemd/system/pamac.service + rm -f $(sysconfdir)/NetworkManager/dispatcher.d/99_update_pamac_tray + rm -f $(datadir)/polkit-1/actions/org.manjaro.pamac.policy + rm -f $(datadir)/mime/packages/x-alpm-package.xml