diff -up ./usbguard-notifier-0.0.6/configure.ac.notifier ./usbguard-notifier-0.0.6/configure.ac --- ./usbguard-notifier-0.0.6/configure.ac.notifier 2020-04-29 07:35:43.057914703 +0200 +++ ./usbguard-notifier-0.0.6/configure.ac 2020-06-17 16:27:53.577151720 +0200 @@ -44,6 +44,32 @@ AC_ARG_WITH( [notificaiton_path="/tmp/usbguard-notifier"] ) +# usbguard-devel +# Add the path to where your usbguard-devel includes are +# You might need this option when you want to package usbguard-notifier +# together with usbguard at the same time +AC_ARG_WITH( + [usbguard-devel], + AS_HELP_STRING([--with-usbguard-devel], [Select to compile notifier from source usbguard devel files(only top level directory)]), + [usbguard_CFLAGS="-I$withval/src/Library/public/" + usbguard_LIBS="" + usbguard_LA="$withval/libusbguard.la" + libusbguard_summary="$usbguard_CFLAGS $usbguard_LIBS" + AC_SUBST([usbguard_CFLAGS]) + AC_SUBST([usbguard_LIBS]) + AC_SUBST([usbguard_LA]) + custom_usbguard_devel_enabled=yes + ], + [ + PKG_CHECK_MODULES( + [usbguard], + [libusbguard >= 0.7.2], + [libusbguard_summary="$usbguard_CFLAGS $usbguard_LIBS"], + [AC_MSG_FAILURE([libusbguard development files not found])] + ) + ] +) + # Build notifier-cli, default is yes AC_ARG_ENABLE([notifier-cli], [AC_HELP_STRING([--enable-notifier-cli], [enable notifier cli(default=yes)])], @@ -81,14 +107,6 @@ PKG_CHECK_MODULES( [AC_MSG_FAILURE([libnotify development files not found])] ) -# usbguard -PKG_CHECK_MODULES( - [usbguard], - [libusbguard >= 0.7.2], - [libusbguard_summary="$usbguard_CFLAGS $usbguard_LIBS"], - [AC_MSG_FAILURE([libusbguard development files not found])] -) - # asciidoc AC_CHECK_PROGS(A2X, [a2x]) if test -z "$A2X"; then @@ -162,6 +180,7 @@ AC_SUBST(config_PATH, $prefix/.config) AC_SUBST(NOTIFICATION_PATH, $notification_path) AM_CONDITIONAL([NOTIFIER_CLI_ENABLED], [test "x$notifier_cli_enabled" = xyes ]) +AM_CONDITIONAL([CUSTOM_USBGUARD_DEVEL_ENABLED], [test "x$custom_usbguard_devel_enabled" = "xyes"]) AC_CONFIG_FILES([ Makefile diff -up ./usbguard-notifier-0.0.6/Makefile.am.notifier ./usbguard-notifier-0.0.6/Makefile.am --- ./usbguard-notifier-0.0.6/Makefile.am.notifier 2020-04-29 07:18:21.024388188 +0200 +++ ./usbguard-notifier-0.0.6/Makefile.am 2020-06-17 16:27:53.592151848 +0200 @@ -57,6 +57,13 @@ usbguard_notifier_CXXFLAGS = \ @usbguard_CFLAGS@ \ -fPIC +if CUSTOM_USBGUARD_DEVEL_ENABLED +usbguard_notifier_LDADD = \ + @usbguard_LA@ +usbguard_notifier_cli_LDADD = \ + @usbguard_LA@ +endif + BUILT_SOURCES = \ src/BuildConfig.h diff -up ./usbguard-notifier-0.0.6/man/usbguard-notifier.1.notifier ./usbguard-notifier-0.0.6/man/usbguard-notifier.1 --- ./usbguard-notifier-0.0.6/man/usbguard-notifier.1.notifier 2020-06-17 19:55:54.621855004 +0200 +++ ./usbguard-notifier-0.0.6/man/usbguard-notifier.1 2020-06-17 19:56:46.551297432 +0200 @@ -53,7 +53,7 @@ Show help\&. .RE .SH "SEE ALSO" .sp -usbguard\-notifier\-cli(1), usbguard(1) +usbguard(1) .SH "BUGS" .sp If you find a bug in this software or if you\(cqd like to request a feature to be implemented, please file a ticket at https://github\&.com/Cropi/usbguard\-notifier/issues/new\&.