Commit 8ddb0394 authored by Michał Polański's avatar Michał Polański Committed by Leo
Browse files

testing/usbguard-notifier: new aport

Notifies on USBGuard policy and device presence changes
https://github.com/Cropi/usbguard-notifier
parent 5698399a
Pipeline #53923 skipped
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=usbguard-notifier
pkgver=0.0.6
pkgrel=0
pkgdesc="Notifies on USBGuard policy and device presence changes"
url="https://github.com/Cropi/usbguard-notifier"
license="GPL-2.0-or-later"
arch="all !s390x !mips !mips64" # limited by librsvg
makedepends="
autoconf
automake
libtool
usbguard-dev
librsvg-dev
libnotify-dev
catch2
asciidoc
"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Cropi/usbguard-notifier/archive/usbguard-notifier-$pkgver.tar.gz
no-systemd.patch"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"
prepare() {
default_prepare
sed -i "s#/usr/include/catch#/usr/include/catch2#g" configure.ac
autoreconf -fiv
}
check() {
make check
}
build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr
make
}
package() {
make install DESTDIR="$pkgdir"
}
sha512sums="521b1cba292a5a1663bb36aad07d73ab1fae729da0a56794b34261c1b848366bac3637018c1cd371332f9d42bc73d5ba3c3b1ae0584cbc5bd9af1bb16a3a0599 usbguard-notifier-0.0.6.tar.gz
09ca4890884d0a62d1b152c6cc5120c9856f46b778cba6f3d36a831ad6f0e5e6651e4e5532e8cefbc55583b862af4c649e6299591fed66b4c9187f7e4f363f85 no-systemd.patch"
Reason: Remove installation of systemd service file
Upstream: No
diff --git a/Makefile.am b/Makefile.am
index dc4174f..e9011fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -112,33 +112,6 @@ EXTRA_DIST += \
.svg.o:
$(LD) -r -b binary -o $@ $<
-#
-# unit file
-#
-install-data-hook: install-systemd-service
-uninstall-hook: uninstall-systemd-service
-
-CLEANFILES += $(top_builddir)/usbguard-notifier.service
-
-#
-# Notifier service
-#
-EXTRA_DIST += \
- $(top_srcdir)/usbguard-notifier.service.in
-
-usbguard-notifier.service: $(top_srcdir)/usbguard-notifier.service.in
- $(SED) -e "s|%bindir%|${bindir}|" $^ > $@ || rm -f $@
-
-install-systemd-service: $(top_builddir)/usbguard-notifier.service
- $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- $(INSTALL) -m 644 $(top_builddir)/usbguard-notifier.service \
- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/usbguard-notifier.service
-
-uninstall-systemd-service:
- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/usbguard-notifier.service
-
-CLEANFILES += $(top_builddir)/usbguard-notifier.service
-
#
# Common defines
#
diff --git a/configure.ac b/configure.ac
index 42dd859..25461cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,16 +81,6 @@ AC_ARG_ENABLE([notifier-cli],
[notifier_cli_enabled=yes]
)
-AC_ARG_ENABLE([systemd-systemunitdir],
- [AC_HELP_STRING([--enable-systemd-systemunitdir], [enable systemd system unit dir(default=no)])],
- [case "${enableval}" in
- yes) systemd_systemunitdir=yes;;
- no) systemd_systemunitdir=no;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-systemd-systemunitdir]) ;;
- esac],
- [systemd_systemunitdir=no]
-)
-
# librsvg2
PKG_CHECK_MODULES(
[rsvg],
@@ -113,20 +103,6 @@ if test -z "$A2X"; then
AC_MSG_FAILURE([Cannot detect documentation generator (asciidoc / a2x)])
fi
-# systemd
-if test "x$systemd_systemunitdir" = xyes; then
- systemd_unit_dir="`$PKG_CONFIG systemd --variable=systemdsystemunitdir`"
-else
- systemd_unit_dir="`$PKG_CONFIG systemd --variable=systemduserunitdir`"
-fi
-
-if test "x$systemd_unit_dir" = x; then
- AC_MSG_FAILURE([Cannot detect the systemd system unit dir])
-fi
-AC_SUBST(SYSTEMD_UNIT_DIR, $systemd_unit_dir)
-AC_DEFINE([SYSTEMD_SUPPORT_ENABLED], [1], [Enable systemd support int the project])
-AM_CONDITIONAL([SYSTEMD_SUPPORT_ENABLED], [test "x$systemd" = xyes ])
-
# Catch C++ library
AC_ARG_WITH([bundled-catch], AS_HELP_STRING([--with-bundled-catch],
[Build using the bundled Catch library]),
@@ -189,9 +165,6 @@ AC_CONFIG_FILES([
AC_OUTPUT
-echo ""
-echo "============== MACROS ================="
-echo " systemd: $systemd_unit_dir"
echo ""
echo "========== LINKER OPTIONS ============="
echo " Catch: $catch_summary"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment