simple-apt-update/Makefile
2023-07-18 16:57:41 +02:00

55 lines
1.4 KiB
Makefile

NAME=simple-apt-update
PREFIX=/usr
DESTDIR=
BINDIR=$(PREFIX)/bin
POLDIR=/usr/share/polkit-1/actions
ICONSDIR=/usr/share/icons
APPDIR=/usr/share/applications
all: \
res/desktop/$(NAME).desktop \
res/polkit/org.freedesktop.policykit.$(NAME).policy
clean:
rm -f res/desktop/$(NAME).desktop
rm -f res/polkit/org.freedesktop.policykit.$(NAME).policy
install: \
bin/$(NAME) \
res/desktop/$(NAME).desktop \
res/icons/$(NAME).svg \
res/polkit/org.freedesktop.policykit.$(NAME).policy
install -d -m 755 \
$(DESTDIR)$(BINDIR)
install -m 755 \
bin/$(NAME) \
$(DESTDIR)$(BINDIR)/$(NAME)
install -d -m 755 \
$(DESTDIR)$(POLDIR)
install -m 644 \
res/polkit/org.freedesktop.policykit.$(NAME).policy \
$(DESTDIR)$(POLDIR)/org.freedesktop.policykit.$(NAME).policy
install -d -m 755 \
$(DESTDIR)$(ICONSDIR)
install -m 644 \
res/icons/$(NAME).svg \
$(DESTDIR)$(ICONSDIR)/$(NAME).svg
install -d -m 755 \
$(DESTDIR)$(APPDIR)
install -m 644 \
res/desktop/$(NAME).desktop \
$(DESTDIR)$(APPDIR)/$(NAME).desktop
res/desktop/$(NAME).desktop: \
res/desktop/$(NAME).desktop.in
sed -e 's|{BINDIR}|$(BINDIR)|' \
< res/desktop/$(NAME).desktop.in \
> res/desktop/$(NAME).desktop
res/polkit/org.freedesktop.policykit.$(NAME).policy: \
res/polkit/org.freedesktop.policykit.$(NAME).policy.in
sed -e 's|{BINDIR}|$(BINDIR)|' \
< res/polkit/org.freedesktop.policykit.$(NAME).policy.in \
> res/polkit/org.freedesktop.policykit.$(NAME).policy