summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD32
-rw-r--r--ax25.patch59
3 files changed, 108 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..33a8b39d806c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ax25-tools
+ pkgdesc = The network tools to configure hamradio interfaces and some of the hamradio specific network daemons
+ pkgver = 0.0.10_rc4
+ pkgrel = 3
+ url = http://www.linux-ax25.org
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = make
+ depends = libax25
+ source = http://www.linux-ax25.org/pub/ax25-tools/ax25-tools-0.0.10-rc4.tar.xz
+ source = ax25.patch
+ sha1sums = c0c16ae86e8f41abb65e4467b619ba06ea310aa0
+ sha1sums = f3dfdfce9a795baef7f93d62d92441e81b96a83e
+
+pkgname = ax25-tools
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5268bd183848
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Contributor: Gordon JC Pearce <gordon@gjcp.net>
+# From the comment by Chuck Atkins <chuckatkins@gmail.com>
+pkgname=ax25-tools
+pkgver=0.0.10_rc4
+_pkgver=${pkgver//_/-}
+pkgrel=3
+pkgdesc="The network tools to configure hamradio interfaces and some of the hamradio specific network daemons"
+arch=('i686' 'x86_64')
+url='http://www.linux-ax25.org'
+license=('GPL2')
+depends=('libax25')
+makedepends=('make')
+source=("http://www.linux-ax25.org/pub/${pkgname}/${pkgname}-${_pkgver}.tar.xz" "ax25.patch")
+sha1sums=('c0c16ae86e8f41abb65e4467b619ba06ea310aa0'
+ 'f3dfdfce9a795baef7f93d62d92441e81b96a83e')
+
+build() {
+ cd "$srcdir/${pkgname}-${_pkgver}"
+ # comment out the line below to leave off the PID file generation
+ patch -Np0 -i "${srcdir}/ax25.patch" || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin || return 1
+ #make clean
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${_pkgver}"
+ # pre-create the directories because the makefile is crap
+ mkdir -p ${pkgdir}/usr/bin
+ make install DESTDIR=$pkgdir || return 1
+ make installconf DESTDIR=$pkgdir || return 1
+}
diff --git a/ax25.patch b/ax25.patch
new file mode 100644
index 000000000000..359d71190721
--- /dev/null
+++ b/ax25.patch
@@ -0,0 +1,59 @@
+--- ax25/ax25d.c
++++ ax25/ax25d.c
+@@ -307,6 +307,17 @@ int main(int argc, char *argv[])
+ syslog(LOG_INFO, "starting");
+ }
+
++ /* gjcp - write PID file */
++ // FIXME - should be configurable
++ FILE *f = fopen("/var/run/ax25d.pid", "w");
++
++ if (f == NULL) {
++ syslog(LOG_WARNING, "Couldn't create PID file /var/run/ax25d.pid: %s", strerror(errno));
++ } else {
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++
+ act.sa_handler = SignalHUP;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+@@ -643,7 +654,8 @@ static void SignalTERM(int code)
+ syslog(LOG_INFO, "terminating on SIGTERM\n");
+ closelog();
+ }
+-
++ // FIXME - hardcoded path
++ unlink("/var/run/ax25d.pid");
+ exit(0);
+ }
+
+--- ax25/mheardd.c
++++ ax25/mheardd.c
+@@ -98,7 +98,7 @@ static void terminate(int sig)
+ syslog(LOG_INFO, "terminating on SIGTERM\n");
+ closelog();
+ }
+-
++ unlink("/var/run/mheardd.pid");
+ exit(0);
+ }
+
+@@ -210,6 +210,17 @@ int main(int argc, char **argv)
+ syslog(LOG_INFO, "starting");
+ }
+
++ /* gjcp - write PID file */
++ // FIXME - should be configurable
++ FILE *f = fopen("/var/run/mheardd.pid", "w");
++
++ if (f == NULL) {
++ syslog(LOG_WARNING, "Couldn't create PID file /var/run/mheardd.pid: %s", strerror(errno));
++ } else {
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++
+ for (;;) {
+ asize = sizeof(sa);
+