summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anderson2020-12-19 13:52:34 -0800
committerEric Anderson2020-12-19 13:52:34 -0800
commitfdda27c45a919feaceabdaab300eae421f54fd79 (patch)
tree552a33009d1aa5ab9cdde216555d469d6d9a17c2
downloadaur-fdda27c45a919feaceabdaab300eae421f54fd79.tar.gz
Initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD45
-rw-r--r--airsane-png-h.patch13
-rw-r--r--airsane-systemd-dir.patch31
4 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4bcf7850c98c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = airsane-git
+ pkgdesc = Publish SANE scanners to MacOS and Android via Apple AirScan
+ pkgver = r161.37fdbc7
+ pkgrel = 1
+ url = https://github.com/SimulPiscator/AirSane
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = cmake
+ makedepends = git
+ depends = avahi
+ depends = libjpeg
+ depends = libpng
+ depends = libusb
+ depends = sane
+ provides = airsane
+ conflicts = airsane
+ source = airsane::git+https://github.com/SimulPiscator/AirSane.git
+ source = airsane-png-h.patch
+ source = airsane-systemd-dir.patch
+ md5sums = SKIP
+ md5sums = c0adf20be58acc81963cdb83a3c6b75e
+ md5sums = 9f972078a3388a210b86aac77c75cfa4
+ sha256sums = SKIP
+ sha256sums = ef034dcdefbaf6b41873d33256b44756c5752184af6c885944527453d8a87162
+ sha256sums = 6be21eb5605d5c24f9ec6ca426c54e983a51d30eb2132db43f5e62cfdf6d7918
+
+pkgname = airsane-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..97f5605e38e2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Eric Anderson <ejona86@gmail.com>
+pkgname=airsane-git
+pkgver=r161.37fdbc7
+pkgrel=1
+pkgdesc="Publish SANE scanners to MacOS and Android via Apple AirScan"
+arch=('i686' 'x86_64')
+url="https://github.com/SimulPiscator/AirSane"
+license=('GPL3')
+depends=('avahi' 'libjpeg' 'libpng' 'libusb' 'sane')
+makedepends=('cmake' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+backup=()
+source=("${pkgname%-git}::git+https://github.com/SimulPiscator/AirSane.git"
+ "airsane-png-h.patch"
+ "airsane-systemd-dir.patch")
+md5sums=('SKIP'
+ 'c0adf20be58acc81963cdb83a3c6b75e'
+ '9f972078a3388a210b86aac77c75cfa4')
+sha256sums=('SKIP'
+ 'ef034dcdefbaf6b41873d33256b44756c5752184af6c885944527453d8a87162'
+ '6be21eb5605d5c24f9ec6ca426c54e983a51d30eb2132db43f5e62cfdf6d7918')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ patch -p1 -i "$srcdir/airsane-png-h.patch"
+ patch -p1 -i "$srcdir/airsane-systemd-dir.patch"
+}
+
+build() {
+ mkdir -p "$srcdir/build"
+ cd "$srcdir/build"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "../${pkgname%-git}"
+ make
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/airsane-png-h.patch b/airsane-png-h.patch
new file mode 100644
index 000000000000..901417c6a124
--- /dev/null
+++ b/airsane-png-h.patch
@@ -0,0 +1,13 @@
+diff --git a/imageformats/pngencoder.cpp b/imageformats/pngencoder.cpp
+index 9fbac9f..1c6c8f6 100644
+--- a/imageformats/pngencoder.cpp
++++ b/imageformats/pngencoder.cpp
+@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ #include "pngencoder.h"
+-#include <libpng/png.h>
++#include <png.h>
+ #include <stdexcept>
+ #include <vector>
+ #if __APPLE__
diff --git a/airsane-systemd-dir.patch b/airsane-systemd-dir.patch
new file mode 100644
index 000000000000..d4b5bdd29a0b
--- /dev/null
+++ b/airsane-systemd-dir.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f37e77d..13ab326 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -63,7 +63,7 @@ install(TARGETS ${PROJECT_NAME}
+ RUNTIME DESTINATION bin
+ )
+ install(FILES systemd/airsaned.service
+- DESTINATION /lib/systemd/system
++ DESTINATION /usr/lib/systemd/system
+ )
+ install(FILES systemd/airsaned.default
+ DESTINATION /etc/default
+diff --git a/systemd/airsaned.service b/systemd/airsaned.service
+index 2c17d67..a6a5134 100644
+--- a/systemd/airsaned.service
++++ b/systemd/airsaned.service
+@@ -4,10 +4,10 @@ After=network-online.target
+
+ [Service]
+ EnvironmentFile=-/etc/default/airsane
+-ExecStart=/usr/local/bin/airsaned --interface=${INTERFACE} --listen-port=${LISTEN_PORT} --access-log=${ACCESS_LOG} --hotplug=${HOTPLUG} --mdns-announce=${MDNS_ANNOUNCE} --local-scanners-only=${LOCAL_SCANNERS_ONLY} --options-file=${OPTIONS_FILE}
++ExecStart=/usr/bin/airsaned --interface=${INTERFACE} --listen-port=${LISTEN_PORT} --access-log=${ACCESS_LOG} --hotplug=${HOTPLUG} --mdns-announce=${MDNS_ANNOUNCE} --local-scanners-only=${LOCAL_SCANNERS_ONLY} --options-file=${OPTIONS_FILE}
+ ExecReload=/bin/kill -HUP $MAINPID
+-User=saned
+-Group=saned
++DynamicUser=true
++Group=scanner
+ Type=simple
+
+ [Install]