Skip to content

Instantly share code, notes, and snippets.

@lilyanatia
Created August 22, 2022 14:31
Show Gist options
  • Save lilyanatia/2db1c0c3e6cd7292b57d4d5d3eb1c8a7 to your computer and use it in GitHub Desktop.
Save lilyanatia/2db1c0c3e6cd7292b57d4d5d3eb1c8a7 to your computer and use it in GitHub Desktop.
diff --git a/.SRCINFO b/.SRCINFO
index a2b93d5..9498245 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = direwolf
pkgdesc = Dire Wolf is a software modem/TNC and APRS encoder/decoder
- pkgver = 1.5
+ pkgver = 1.6
pkgrel = 1
url = https://github.com/wb2osz/direwolf
arch = i686
@@ -13,18 +13,17 @@ pkgbase = direwolf
makedepends = patch
depends = alsa-lib
depends = gpsd
- source = https://github.com/wb2osz/direwolf/archive/1.5.zip
- source = Makefile.patch
+ source = https://github.com/wb2osz/direwolf/archive/refs/tags/1.6.zip
+ source = CMakeLists.patch
source = direwolf.service
source = direwolf-kiss.service
- sha1sums = 109e4119ead6ee98b952185faae059770d4292f1
- sha1sums = 2b5290da15331d1cba0cef9d3607abc0441680b1
+ sha1sums = 2b8ec9fb7feba914ef84398b079d06cf7d79d97c
+ sha1sums = 01e5d914bb1e5d50ad6f077122656c524d8ea4c6
sha1sums = 66366c7a4e8d3768013f9036f2681a86d4b8ad88
sha1sums = eea3a3fb334645cd8a1e2604dc6c6b024148722a
- sha256sums = ef74ffd75572531ed4a93fc28bc0ccb6eb70f3315cd7df4640a784f156d8f79a
- sha256sums = 66573cdd7619784dd4967bdee219619c0f12fda7c953374380f40949a5c8a9bb
+ sha256sums = 7a675ae91b4a8795a65e05b64477e95ae2e9c44af6a6f5c15e5e3d30dc7e6f96
+ sha256sums = 0f83b61e89dc040fbc6b11c39c09133ae079d881acdd4775f693eda55d80a203
sha256sums = a1efe2bb96470bc52faa747708b195a685dc454f3d9c91f6bf4d39ab94d3608a
sha256sums = 2a2e4acc769a20afebdfdcd21640fd17b0c4217ceb7ecb3378f9ee5c45fadc68
pkgname = direwolf
-
diff --git a/Makefile.patch b/Makefile.patch
deleted file mode 100644
index f6c0e3f..0000000
--- a/Makefile.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Only in direwolf-1.5: aclients
-Only in direwolf-1.5: atest
-Only in direwolf-1.5: ax25_link.o
-Only in direwolf-1.5: cm108
-Only in direwolf-1.5: cm108.o
-Only in direwolf-1.5: decode_aprs
-Only in direwolf-1.5: direwolf
-Only in direwolf-1.5: direwolf.conf
-Only in direwolf-1.5: direwolf.desktop
-Only in direwolf-1.5: dtime_now.o
-Only in direwolf-1.5: dwgpsd.o
-Only in direwolf-1.5: error_string.o
-Only in direwolf-1.5: gen_packets
-Only in direwolf-1.5: geotranz.a
-Only in direwolf-1.5: kissutil
-Only in direwolf-1.5: ll2utm
-Only in direwolf-1.5: log2gpx
-diff -ur direwolf-1.5.org/Makefile.linux direwolf-1.5/Makefile.linux
---- direwolf-1.5.org/Makefile.linux 2018-10-08 16:15:21.000000000 +0200
-+++ direwolf-1.5/Makefile.linux 2018-10-18 08:58:37.487067005 +0200
-@@ -272,17 +272,6 @@
- endif
-
-
--# Enable GPS if header file is present.
--# Finding libgps.so* is more difficult because it
--# is in different places on different operating systems.
--
--enable_gpsd := $(wildcard /usr/include/gps.h)
--ifneq ($(enable_gpsd),)
--CFLAGS += -DENABLE_GPSD
--LDFLAGS += -lgps
--endif
--
--
- # Enable hamlib support if header file is present.
-
- enable_hamlib := $(wildcard /usr/include/hamlib/rig.h /usr/local/include/hamlib/rig.h)
-@@ -680,7 +669,7 @@
- # Set group and mode of HID devices corresponding to C-Media USB Audio adapters.
- # This will allow us to use the CM108/CM119 GPIO pins for PTT.
- #
-- $(INSTALL) -D --mode=644 99-direwolf-cmedia.rules /etc/udev/rules.d/99-direwolf-cmedia.rules
-+# $(INSTALL) -D --mode=644 99-direwolf-cmedia.rules /etc/udev/rules.d/99-direwolf-cmedia.rules
- #
- @echo " "
- @echo "If this is your first install, not an upgrade, type this to put a copy"
-Only in direwolf-1.5: mgrs.o
-Only in direwolf-1.5: mheard.o
-Only in direwolf-1.5: misc.a
-Only in direwolf-1.5: polarst.o
-Only in direwolf-1.5: sock.o
-Only in direwolf-1.5: strlcat.o
-Only in direwolf-1.5: strlcpy.o
-Only in direwolf-1.5: text2tt
-Only in direwolf-1.5: tranmerc.o
-Only in direwolf-1.5: tt2text
-Only in direwolf-1.5: ttcalc
-Only in direwolf-1.5: ttcalc.o
-Only in direwolf-1.5: ups.o
-Only in direwolf-1.5: usng.o
-Only in direwolf-1.5: utm2ll
-Only in direwolf-1.5: utm.o
diff --git a/PKGBUILD b/PKGBUILD
index a053393..8ef4b67 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Wijnand Modderman-Lenstra <maze@pyth0n.org>
pkgname=direwolf
-pkgver=1.5
+pkgver=1.6
pkgrel=1
epoch=
pkgdesc="Dire Wolf is a software modem/TNC and APRS encoder/decoder"
@@ -10,48 +10,31 @@ license=('GPL')
depends=('alsa-lib' 'gpsd')
makedepends=('make' 'gcc' 'patch')
source=(
- "https://github.com/wb2osz/direwolf/archive/$pkgver.zip"
- 'Makefile.patch'
+ "https://github.com/wb2osz/direwolf/archive/refs/tags/$pkgver.zip"
+ 'CMakeLists.patch'
'direwolf.service'
'direwolf-kiss.service'
)
-sha1sums=('109e4119ead6ee98b952185faae059770d4292f1'
- '2b5290da15331d1cba0cef9d3607abc0441680b1'
+sha1sums=('2b8ec9fb7feba914ef84398b079d06cf7d79d97c'
+ '01e5d914bb1e5d50ad6f077122656c524d8ea4c6'
'66366c7a4e8d3768013f9036f2681a86d4b8ad88'
'eea3a3fb334645cd8a1e2604dc6c6b024148722a')
-sha256sums=('ef74ffd75572531ed4a93fc28bc0ccb6eb70f3315cd7df4640a784f156d8f79a'
- '66573cdd7619784dd4967bdee219619c0f12fda7c953374380f40949a5c8a9bb'
+sha256sums=('7a675ae91b4a8795a65e05b64477e95ae2e9c44af6a6f5c15e5e3d30dc7e6f96'
+ '0f83b61e89dc040fbc6b11c39c09133ae079d881acdd4775f693eda55d80a203'
'a1efe2bb96470bc52faa747708b195a685dc454f3d9c91f6bf4d39ab94d3608a'
'2a2e4acc769a20afebdfdcd21640fd17b0c4217ceb7ecb3378f9ee5c45fadc68')
prepare() {
cd "$pkgname-$pkgver"
- patch -p1 < "$srcdir/Makefile.patch"
+ patch -p1 < "$srcdir/CMakeLists.patch"
}
build() {
- cd "$pkgname-$pkgver"
- make
-}
-
-check() {
- :
+ cmake -B build -S "$pkgname-$pkgver" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release
+ cmake --build build
}
package() {
- cd "$pkgname-$pkgver"
- mkdir -p "$pkgdir/usr/bin"
- mkdir -p "$pkgdir/usr/share/doc/$pkgname"
- mkdir -p "$pkgdir/var/log/direwolf"
- make DESTDIR="$pkgdir/usr" enable_gpsd="" install
-
- mkdir -p "$pkgdir/etc/udev/rules.d"
- install -D -m 644 99-direwolf-cmedia.rules "$pkgdir/etc/udev/rules.d/99-direwolf-cmedia.rules"
-
- mkdir -p "$pkgdir/etc/direwolf"
- install -D -m 644 direwolf.conf "$pkgdir/etc/direwolf/direwolf.conf"
-
- 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"
+ DESTDIR="$pkgdir" cmake --install build
+ rm -rf "$pkgdir/etc"
}
@N0NB
Copy link

N0NB commented Dec 23, 2022

Your modified PKGBUILD includes the line:

    'CMakeLists.patch'

but it is not included therefore the makepkg step fails as:

==> ERROR: CMakeLists.patch was not found in the build directory and is not a URL.

Do you have this file available to add to this gist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment