summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2013-12-20 17:34:59 +0000
committerWill Thompson <will@willthompson.co.uk>2014-01-12 13:13:04 +0000
commit5168c85e177fcbddde012cc099b7347d0736ded3 (patch)
treed29a2025a27b82d27d405d6224694713074951bb /Makefile
parentcc1f95cdf3f0027ff245aee7cd5cfbec88ec38d0 (diff)
data: Add AppData and .desktop files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 22 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 16fc353..198204c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,15 +5,18 @@ PCAP_FLAGS := $(shell pcap-config --cflags pcap-config --libs)
DESTDIR =
PREFIX = /usr/local
BINDIR = $(DESTDIR)$(PREFIX)/bin
-MAN1DIR = $(DESTDIR)$(PREFIX)/share/man/man1
+DATADIR = $(DESTDIR)$(PREFIX)/share
+MAN1DIR = $(DATADIR)/man/man1
BINARIES = \
dist/build/bustle-pcap \
$(NULL)
MANPAGE = bustle-pcap.1
+DESKTOP_FILE = bustle.desktop
+APPDATA_FILE = bustle.appdata.xml
-all: $(BINARIES) $(MANPAGE)
+all: $(BINARIES) $(MANPAGE) $(DESKTOP_FILE) $(APPDATA_FILE)
BUSTLE_PCAP_SOURCES = c-sources/pcap-monitor.c c-sources/bustle-pcap.c
BUSTLE_PCAP_GENERATED_HEADERS = dist/build/autogen/version.h
@@ -22,6 +25,12 @@ BUSTLE_PCAP_HEADERS = c-sources/pcap-monitor.h $(BUSTLE_PCAP_GENERATED_HEADERS)
bustle-pcap.1: dist/build/bustle-pcap
-help2man --output=$@ --no-info --name='Generate D-Bus logs for bustle' $<
+bustle.desktop: data/bustle.desktop.in
+ LC_ALL=C intltool-merge -d -u po $< $@
+
+bustle.appdata.xml: data/bustle.appdata.xml.in
+ LC_ALL=C intltool-merge -x -u po $< $@
+
dist/build/bustle-pcap: $(BUSTLE_PCAP_SOURCES) $(BUSTLE_PCAP_HEADERS)
@mkdir -p dist/build
$(CC) -Idist/build/autogen $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
@@ -37,13 +46,20 @@ install: all
mkdir -p $(BINDIR)
cp $(BINARIES) $(BINDIR)
-mkdir -p $(MAN1DIR)
- -cp bustle-pcap.1 $(MAN1DIR)
+ -cp $(MANPAGE) $(MAN1DIR)
+ mkdir -p $(DATADIR)/applications
+ cp $(DESKTOP_FILE) $(DATADIR)/applications
+ mkdir -p $(DATADIR)/appdata
+ cp $(APPDATA_FILE) $(DATADIR)/appdata
uninstall:
- rm -f $(notdir $(BINARIES))
+ rm -f $(BINDIR)/$(notdir $(BINARIES))
+ rm -f $(MAN1DIR)/$(MANPAGE)
+ rm -f $(DATADIR)/applications/$(DESKTOP_FILE)
+ rm -f $(DATADIR)/appdata/$(APPDATA_FILE)
clean:
- rm -f $(BINARIES) $(MANPAGE) $(BUSTLE_PCAP_GENERATED_HEADERS)
+ rm -f $(BINARIES) $(MANPAGE) $(BUSTLE_PCAP_GENERATED_HEADERS) $(DESKTOP_FILE) $(APPDATA_FILE)
if test -d ./$(TARBALL_DIR); then rm -r ./$(TARBALL_DIR); fi
rm -f ./$(TARBALL)
@@ -63,7 +79,7 @@ maintainer-binary-tarball: all
perl -pi -e 's{^ bustle-pcap}{ ./bustle-pcap};' \
-e 's{^ bustle} { ./bustle.sh};' \
$(TARBALL_FULL_DIR)/README
- cp $(BINARIES) $(MANPAGE) $(TARBALL_FULL_DIR)
+ cp $(BINARIES) $(MANPAGE) $(DESKTOP_FILE) $(APPDATA_FILE) $(TARBALL_FULL_DIR)
mkdir -p $(TARBALL_FULL_DIR)/lib
cp LICENSE.bundled-libraries $(TARBALL_FULL_DIR)/lib
./ldd-me-up.sh $(TARBALL_FULL_DIR)/bin/bustle \