diff options
author | Alexander Fasching | 2019-11-27 11:58:37 +0100 |
---|---|---|
committer | Alexander Fasching | 2019-11-27 11:58:37 +0100 |
commit | d78554a950d80e797f3b5a8884e47c360a4d7951 (patch) | |
tree | 34e41c71f6cabc77f18dce4adeb984b5219fe49f | |
parent | d7b0ba96668179f723af27abedab7dfb529e5e62 (diff) | |
download | aur-d78554a950d80e797f3b5a8884e47c360a4d7951.tar.gz |
upgpkg: direwolf-git 1.5.beta4.r97.g6e92a4f-1
Switch to CMake build
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | 0001-Add-build-option-for-udev-path.patch | 39 | ||||
-rw-r--r-- | 0001-Makefile.patch | 13 | ||||
-rw-r--r-- | PKGBUILD | 31 |
4 files changed, 63 insertions, 29 deletions
@@ -1,6 +1,6 @@ pkgbase = direwolf-git pkgdesc = Software modem/TNC and APRS encoder/decoder - pkgver = 1.5.beta4.r64.gc72d06c + pkgver = 1.5.beta4.r97.g6e92a4f pkgrel = 1 url = https://github.com/wb2osz/direwolf arch = i686 @@ -9,21 +9,22 @@ pkgbase = direwolf-git arch = armv7h license = GPL makedepends = git + makedepends = cmake depends = alsa-lib depends = gpsd depends = hamlib provides = direwolf conflicts = direwolf source = git+https://github.com/wb2osz/direwolf.git#branch=dev - source = 0001-Makefile.patch + source = 0001-Add-build-option-for-udev-path.patch source = direwolf.service source = direwolf-kiss.service sha1sums = SKIP - sha1sums = 749c44b5060e911ea0b647ee4dc4af1ed0544fc8 + sha1sums = c768819622aa10092a1dc3481e4f2340b9674593 sha1sums = 66366c7a4e8d3768013f9036f2681a86d4b8ad88 sha1sums = eea3a3fb334645cd8a1e2604dc6c6b024148722a sha256sums = SKIP - sha256sums = ad4eae3a6d0c8d6703cace8b956fc3e338ef7b6e951fd116dc75a81786b88fc2 + sha256sums = 3c80f0350df3959a759906722837514aedb0488e008a6ba5081cd727fce7e2ad sha256sums = a1efe2bb96470bc52faa747708b195a685dc454f3d9c91f6bf4d39ab94d3608a sha256sums = 2a2e4acc769a20afebdfdcd21640fd17b0c4217ceb7ecb3378f9ee5c45fadc68 diff --git a/0001-Add-build-option-for-udev-path.patch b/0001-Add-build-option-for-udev-path.patch new file mode 100644 index 000000000000..23ae713acc10 --- /dev/null +++ b/0001-Add-build-option-for-udev-path.patch @@ -0,0 +1,39 @@ +From 632127500dabbfb42156e312d628d0467b31e213 Mon Sep 17 00:00:00 2001 +From: Alexander Fasching <fasching.a91@gmail.com> +Date: Mon, 25 Nov 2019 16:27:16 +0100 +Subject: [PATCH] Add build option for udev path + +--- + CMakeLists.txt | 3 +++ + conf/CMakeLists.txt | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a55c351..5133e63 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -187,6 +187,9 @@ else() + set(INSTALL_SCRIPTS_DIR "${INSTALL_DOC_DIR}/scripts") + set(INSTALL_MAN_DIR "share/man/man1") + set(INSTALL_DATA_DIR "share/${PROJECT_NAME}") ++ if (NOT DEFINED UDEV_RULES_DIR OR "${UDEV_RULES_DIR}" STREQUAL "") ++ set(UDEV_RULES_DIR "/etc/udev/rules.d") ++ endif() + endif(WIN32 OR CYGWIN) + + # requirements +diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt +index d4a229d..a84497f 100644 +--- a/conf/CMakeLists.txt ++++ b/conf/CMakeLists.txt +@@ -26,7 +26,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}") + + # install udev rules for CM108 + if(LINUX) +- install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/) ++ install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION ${UDEV_RULES_DIR}) + endif() + + install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR}) +-- +2.24.0 diff --git a/0001-Makefile.patch b/0001-Makefile.patch deleted file mode 100644 index 9162a408499a..000000000000 --- a/0001-Makefile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.linux b/Makefile.linux -index a5a6f74..86e89e5 100644 ---- a/Makefile.linux -+++ b/Makefile.linux -@@ -571,7 +571,7 @@ install : $(APPS) direwolf.conf tocalls.txt symbols-new.txt symbolsX.txt dw-icon - # I don't think this is applicable to BSD. - # - ifeq ($(OS),Linux) -- $(INSTALL_DATA) 99-direwolf-cmedia.rules /etc/udev/rules.d/99-direwolf-cmedia.rules -+ $(INSTALL_DATA) 99-direwolf-cmedia.rules $(ROOTDIR)/etc/udev/rules.d/99-direwolf-cmedia.rules - endif - # - @echo " " @@ -1,30 +1,29 @@ # Maintainer: Alexander Fasching <fasching.a91@gmail.com> pkgname=direwolf-git _pkgname=direwolf -pkgver=1.5.beta4.r64.gc72d06c +pkgver=1.5.beta4.r97.g6e92a4f pkgrel=1 pkgdesc="Software modem/TNC and APRS encoder/decoder" arch=('i686' 'x86_64' 'armv6h' 'armv7h') url="https://github.com/wb2osz/direwolf" license=('GPL') depends=('alsa-lib' 'gpsd' 'hamlib') -makedepends=('git') +makedepends=('git' 'cmake') provides=('direwolf') conflicts=('direwolf') source=('git+https://github.com/wb2osz/direwolf.git#branch=dev' - '0001-Makefile.patch' + '0001-Add-build-option-for-udev-path.patch' 'direwolf.service' 'direwolf-kiss.service') sha1sums=('SKIP' - '749c44b5060e911ea0b647ee4dc4af1ed0544fc8' + 'c768819622aa10092a1dc3481e4f2340b9674593' '66366c7a4e8d3768013f9036f2681a86d4b8ad88' 'eea3a3fb334645cd8a1e2604dc6c6b024148722a') sha256sums=('SKIP' - 'ad4eae3a6d0c8d6703cace8b956fc3e338ef7b6e951fd116dc75a81786b88fc2' + '3c80f0350df3959a759906722837514aedb0488e008a6ba5081cd727fce7e2ad' 'a1efe2bb96470bc52faa747708b195a685dc454f3d9c91f6bf4d39ab94d3608a' '2a2e4acc769a20afebdfdcd21640fd17b0c4217ceb7ecb3378f9ee5c45fadc68') - pkgver() { cd "$_pkgname" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' @@ -32,24 +31,32 @@ pkgver() { prepare() { cd "$_pkgname" - git apply ../0001-Makefile.patch + git apply ../0001-Add-build-option-for-udev-path.patch } build() { cd "$_pkgname" + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \ + -DCMAKE_BUILD_TYPE=Release \ + -DUDEV_RULES_DIR="$pkgdir/etc/udev/rules.d" \ + .. make } package() { - cd "$_pkgname" - mkdir -p "$pkgdir/usr/bin" - mkdir -p "$pkgdir/usr/share/doc/$_pkgname" - mkdir -p "$pkgdir/var/log/direwolf" - make DESTDIR="$pkgdir/usr" ROOTDIR="$pkgdir" install + cd "$_pkgname/build" + make install + #mkdir -p "$pkgdir/usr/bin" + #mkdir -p "$pkgdir/usr/share/doc/$_pkgname" + #mkdir -p "$pkgdir/var/log/direwolf" + mkdir -p "$pkgdir/etc/direwolf" install -D -m 644 direwolf.conf "$pkgdir/etc/direwolf/direwolf.conf" + cd "$srcdir" mkdir -p "$pkgdir/usr/lib/systemd/system" install -D -m 644 ../direwolf.service "$pkgdir/usr/lib/systemd/system" install -D -m 644 ../direwolf-kiss.service "$pkgdir/usr/lib/systemd/system" |