summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2013-04-28 11:47:54 +0200
committerSebastian Reichel <sre@ring0.de>2013-04-28 11:47:54 +0200
commit10164bb2607f7e8681ff16a724104c98cadb7089 (patch)
tree84d9307386afc3eac8d5dd64446817f24e27b3dc
parent3f503dedb00572fdbf4765a1f3340b9245165267 (diff)
downloadserial-barcode-scanner-10164bb2607f7e8681ff16a724104c98cadb7089.tar.bz2
add dbus service files
-rw-r--r--Makefile1
-rw-r--r--dbus/Makefile25
-rw-r--r--dbus/io.mainframe.shopsystem.AudioPlayer.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.Config.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.Database.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.InvoicePDF.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.PGP.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.ScannerSession.service.in3
-rw-r--r--dbus/io.mainframe.shopsystem.SerialDevice.service.in3
9 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b80d992..b47c17b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ clean:
install:
cd src && make install
+ cd dbus && make install
shop.db: sql/tables.sql sql/views.sql sql/trigger.sql
@for file in $^ ; do \
diff --git a/dbus/Makefile b/dbus/Makefile
new file mode 100644
index 0000000..6857ee3
--- /dev/null
+++ b/dbus/Makefile
@@ -0,0 +1,25 @@
+SERVICEFILESIN=$(wildcard *.service.in)
+SERVICEFILES=$(basename ${SERVICEFILESIN})
+INSTALLPATH=~/.local/share/dbus-1/services/
+BINARYPATH=$(realpath $(dir $(lastword $(MAKEFILE_LIST)))/../src)
+ESCAPEDBINARYPATH=
+
+%.service: %.service.in
+ @echo [GEN] $@
+ @sed "s~\$${PATH}~${BINARYPATH}~g" $< > $@
+
+all: ${SERVICEFILES}
+
+install: ${SERVICEFILES}
+ @echo Installing DBus service files into ${INSTALLPATH}...
+ @mkdir -p ${INSTALLPATH}
+ @$(foreach file,${SERVICEFILES},install -m644 ${file} ${INSTALLPATH}/${file};)
+
+uninstall:
+ @echo Remove DBus service files from ${INSTALLPATH}...
+ @$(foreach file,${SERVICEFILES},rm -f ${INSTALLPATH}/${file};)
+
+clean:
+ @rm -f ${SERVICEFILES}
+
+.PHONY: all clean install uninstall
diff --git a/dbus/io.mainframe.shopsystem.AudioPlayer.service.in b/dbus/io.mainframe.shopsystem.AudioPlayer.service.in
new file mode 100644
index 0000000..3629cae
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.AudioPlayer.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.AudioPlayer
+Exec=${PATH}/audio/audio
diff --git a/dbus/io.mainframe.shopsystem.Config.service.in b/dbus/io.mainframe.shopsystem.Config.service.in
new file mode 100644
index 0000000..b2cdb7e
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.Config.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.Config
+Exec=${PATH}/config/config
diff --git a/dbus/io.mainframe.shopsystem.Database.service.in b/dbus/io.mainframe.shopsystem.Database.service.in
new file mode 100644
index 0000000..02674ed
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.Database.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.Database
+Exec=${PATH}/database/database
diff --git a/dbus/io.mainframe.shopsystem.InvoicePDF.service.in b/dbus/io.mainframe.shopsystem.InvoicePDF.service.in
new file mode 100644
index 0000000..a41a69f
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.InvoicePDF.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.InvoicePDF
+Exec=${PATH}/pdf-invoice/pdf-invoice
diff --git a/dbus/io.mainframe.shopsystem.PGP.service.in b/dbus/io.mainframe.shopsystem.PGP.service.in
new file mode 100644
index 0000000..29bca05
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.PGP.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.PGP
+Exec=${PATH}/pgp/pgp
diff --git a/dbus/io.mainframe.shopsystem.ScannerSession.service.in b/dbus/io.mainframe.shopsystem.ScannerSession.service.in
new file mode 100644
index 0000000..2484a06
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.ScannerSession.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.ScannerSession
+Exec=${PATH}/scanner-session
diff --git a/dbus/io.mainframe.shopsystem.SerialDevice.service.in b/dbus/io.mainframe.shopsystem.SerialDevice.service.in
new file mode 100644
index 0000000..4574f0b
--- /dev/null
+++ b/dbus/io.mainframe.shopsystem.SerialDevice.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.mainframe.shopsystem.SerialDevice
+Exec=${PATH}/serial-device/serial-device