summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Feuls2015-06-11 09:04:25 +0200
committerCarsten Feuls2015-06-11 09:04:25 +0200
commit7bf1218d0dca18223c31904d7669c29527426495 (patch)
treeb6c9e10fc949ee9e1ce7d277a299018ecbc4da99
downloadaur-soundmodem-server.tar.gz
Initial import
-rw-r--r--.SRCINFO33
-rw-r--r--0001-Search-replace-of-extern-inline-static-inline.patch454
-rw-r--r--PKGBUILD77
-rw-r--r--configure_ac.patch36
-rw-r--r--soundmodem.conf2
-rw-r--r--soundmodem.service9
-rw-r--r--soundmodem_conf.d1
7 files changed, 612 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8b6c708b60d6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = soundmodem-server
+ pkgdesc = Multiplatform Soundcard Packet Radio Modem without configuration GUI
+ pkgver = 0.18
+ pkgrel = 1
+ url = http://pv529.ncsrv.de/soundmodem/
+ arch = i686
+ arch = x86_64
+ arch = armv5h
+ arch = armv6h
+ arch = armv7h
+ license = GPL2
+ depends = audiofile
+ depends = libxml2
+ depends = alsa-lib
+ provides = soundmodem
+ conflicts = soundmodem
+ backup = etc/ax25/soundmodem.conf
+ backup = etc/conf.d/soundmodem
+ source = configure_ac.patch
+ source = 0001-Search-replace-of-extern-inline-static-inline.patch
+ source = soundmodem.conf
+ source = soundmodem_conf.d
+ source = http://pv529.ncsrv.de/soundmodem/soundmodem-0.18.tar.gz
+ source = soundmodem.service
+ sha256sums = c97f91b5ac9ad0b218a3d2de3b843cc934d6112da9df4c1c9b72d4f04fd03520
+ sha256sums = 3a6e57ae1b89acbc25cb4758f2130e936f83fcec0aa1488f92f46c3d59e2d9b1
+ sha256sums = 36ed996571e2b39c75b27a5f765527bdcc737c4d30a681983c8415f4c742b825
+ sha256sums = 6719bc2d61dcf6edc4a8bcad4467a58696e0ce0f066badc39f6c0d47686cc2c3
+ sha256sums = f033c1716df1378cda646dbb1c48ea9fb9a068772c6686f2ca411bfa64245c1c
+ sha256sums = 3be5b647f4798ff93df84a02097f97223f00508e6d2031cdbf0ee5f85397de81
+
+pkgname = soundmodem-server
+
diff --git a/0001-Search-replace-of-extern-inline-static-inline.patch b/0001-Search-replace-of-extern-inline-static-inline.patch
new file mode 100644
index 000000000000..a8373b795636
--- /dev/null
+++ b/0001-Search-replace-of-extern-inline-static-inline.patch
@@ -0,0 +1,454 @@
+From 0f3a32b23c90a36f67683e7215d5b7e503eed2c5 Mon Sep 17 00:00:00 2001
+From: Christian Vogel <vogelchr@vogel.cx>
+Date: Sun, 24 May 2015 12:07:13 +0200
+Subject: [PATCH] Search/replace of extern inline -> static inline.
+
+Inline functions in header files are declared as 'extern inline'
+which makes the compiler also emit a externally visible version
+of the function. This gives us "multiple definition of..." errors
+during compile.
+---
+ newqpsk/complex.h | 14 +++++++-------
+ newqpsk/fec.h | 4 ++--
+ newqpsk/filter-i386.h | 2 +-
+ newqpsk/filter.h | 2 +-
+ newqpsk/genfilt.c | 2 +-
+ newqpsk/misc.h | 18 +++++++++---------
+ p3dmodem/genp3dtbl.c | 2 +-
+ pammodem/genpamtbl.c | 2 +-
+ pammodem/meas.c | 2 +-
+ pammodem/pammodem.c | 4 ++--
+ pskmodem/genpsktbl.c | 2 +-
+ pskmodem/measpsk.c | 2 +-
+ pskmodem/pskmlse.c | 4 ++--
+ pskmodem/pskmodem.c | 2 +-
+ soundcard/modem.h | 2 +-
+ soundcard/simd.h | 18 +++++++++---------
+ 16 files changed, 41 insertions(+), 41 deletions(-)
+
+diff --git a/newqpsk/complex.h b/newqpsk/complex.h
+index 2353865..586572c 100644
+--- a/newqpsk/complex.h
++++ b/newqpsk/complex.h
+@@ -13,7 +13,7 @@ typedef struct {
+ /*
+ * Complex multiplication.
+ */
+-extern __inline__ complex cmul(complex x, complex y)
++static inline complex cmul(complex x, complex y)
+ {
+ complex z;
+
+@@ -27,7 +27,7 @@ extern __inline__ complex cmul(complex x, complex y)
+ * Complex ... yeah, what??? Returns a complex number that has the
+ * properties: |z| = |x| * |y| and arg(z) = arg(y) - arg(x)
+ */
+-extern __inline__ complex ccor(complex x, complex y)
++static inline complex ccor(complex x, complex y)
+ {
+ complex z;
+
+@@ -40,7 +40,7 @@ extern __inline__ complex ccor(complex x, complex y)
+ /*
+ * Real part of the complex ???
+ */
+-extern __inline__ float ccorI(complex x, complex y)
++static inline float ccorI(complex x, complex y)
+ {
+ return x.re * y.re + x.im * y.im;
+ }
+@@ -48,7 +48,7 @@ extern __inline__ float ccorI(complex x, complex y)
+ /*
+ * Imaginary part of the complex ???
+ */
+-extern __inline__ float ccorQ(complex x, complex y)
++static inline float ccorQ(complex x, complex y)
+ {
+ return x.re * y.im - x.im * y.re;
+ }
+@@ -56,7 +56,7 @@ extern __inline__ float ccorQ(complex x, complex y)
+ /*
+ * Modulo (absolute value) of a complex number.
+ */
+-extern __inline__ float cmod(complex x)
++static inline float cmod(complex x)
+ {
+ return sqrt(x.re * x.re + x.im * x.im);
+ }
+@@ -64,7 +64,7 @@ extern __inline__ float cmod(complex x)
+ /*
+ * Square of the absolute value (power).
+ */
+-extern __inline__ float cpwr(complex x)
++static inline float cpwr(complex x)
+ {
+ return (x.re * x.re + x.im * x.im);
+ }
+@@ -72,7 +72,7 @@ extern __inline__ float cpwr(complex x)
+ /*
+ * Argument of a complex number.
+ */
+-extern __inline__ float carg(complex x)
++static inline float carg(complex x)
+ {
+ return atan2(x.im, x.re);
+ }
+diff --git a/newqpsk/fec.h b/newqpsk/fec.h
+index 109ad51..409daf1 100644
+--- a/newqpsk/fec.h
++++ b/newqpsk/fec.h
+@@ -13,7 +13,7 @@ struct fecstate {
+
+ /* --------------------------------------------------------------------- */
+
+-extern inline void init_fec(struct fecstate *f)
++static inline void init_fec(struct fecstate *f)
+ {
+ switch (f->feclevel) {
+ case 0:
+@@ -33,7 +33,7 @@ extern inline void init_fec(struct fecstate *f)
+
+ /* --------------------------------------------------------------------- */
+
+-extern inline void init_inlv(struct fecstate *f)
++static inline void init_inlv(struct fecstate *f)
+ {
+ int i;
+
+diff --git a/newqpsk/filter-i386.h b/newqpsk/filter-i386.h
+index 01b3f5d..d881b2c 100644
+--- a/newqpsk/filter-i386.h
++++ b/newqpsk/filter-i386.h
+@@ -1,7 +1,7 @@
+ #ifndef _FILTER_I386_H
+ #define _FILTER_I386_H
+ #define __HAVE_ARCH_MAC
+-extern inline float mac(const float *a, const float *b, unsigned int size)
++static inline float mac(const float *a, const float *b, unsigned int size)
+ {
+ float f;
+ asm volatile (
+diff --git a/newqpsk/filter.h b/newqpsk/filter.h
+index ae789fc..754811e 100644
+--- a/newqpsk/filter.h
++++ b/newqpsk/filter.h
+@@ -12,7 +12,7 @@
+ /* ---------------------------------------------------------------------- */
+
+ #ifndef __HAVE_ARCH_MAC
+-extern inline float mac(const float *a, const float *b, unsigned int size)
++static inline float mac(const float *a, const float *b, unsigned int size)
+ {
+ float sum = 0;
+ unsigned int i;
+diff --git a/newqpsk/genfilt.c b/newqpsk/genfilt.c
+index a2eb077..5aec7bf 100644
+--- a/newqpsk/genfilt.c
++++ b/newqpsk/genfilt.c
+@@ -18,7 +18,7 @@ int main(int argc, char **argv)
+ puts("#define _FILTER_I386_H");
+ puts("#define __HAVE_ARCH_MAC");
+
+- puts("extern inline float mac(const float *a, const float *b, unsigned int size)");
++ puts("static inline float mac(const float *a, const float *b, unsigned int size)");
+ puts("{");
+ puts("\tfloat f;");
+ puts("\tasm volatile (");
+diff --git a/newqpsk/misc.h b/newqpsk/misc.h
+index aa3dfc5..e80301d 100644
+--- a/newqpsk/misc.h
++++ b/newqpsk/misc.h
+@@ -10,7 +10,7 @@
+ /*
+ * Hamming weight (number of bits that are ones).
+ */
+-extern inline unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ w = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ w = (w & 0x33333333) + ((w >> 2) & 0x33333333);
+@@ -20,7 +20,7 @@ extern inline unsigned int hweight32(unsigned int w)
+ return w;
+ }
+
+-extern inline unsigned int hweight16(unsigned short w)
++static inline unsigned int hweight16(unsigned short w)
+ {
+ w = (w & 0x5555) + ((w >> 1) & 0x5555);
+ w = (w & 0x3333) + ((w >> 2) & 0x3333);
+@@ -29,7 +29,7 @@ extern inline unsigned int hweight16(unsigned short w)
+ return w;
+ }
+
+-extern inline unsigned int hweight8(unsigned char w)
++static inline unsigned int hweight8(unsigned char w)
+ {
+ w = (w & 0x55) + ((w >> 1) & 0x55);
+ w = (w & 0x33) + ((w >> 2) & 0x33);
+@@ -42,7 +42,7 @@ extern inline unsigned int hweight8(unsigned char w)
+ /*
+ * Reverse order of bits.
+ */
+-extern inline unsigned int rbits32(unsigned int w)
++static inline unsigned int rbits32(unsigned int w)
+ {
+ w = ((w >> 1) & 0x55555555) | ((w << 1) & 0xaaaaaaaa);
+ w = ((w >> 2) & 0x33333333) | ((w << 2) & 0xcccccccc);
+@@ -52,7 +52,7 @@ extern inline unsigned int rbits32(unsigned int w)
+ return w;
+ }
+
+-extern inline unsigned short rbits16(unsigned short w)
++static inline unsigned short rbits16(unsigned short w)
+ {
+ w = ((w >> 1) & 0x5555) | ((w << 1) & 0xaaaa);
+ w = ((w >> 2) & 0x3333) | ((w << 2) & 0xcccc);
+@@ -61,7 +61,7 @@ extern inline unsigned short rbits16(unsigned short w)
+ return w;
+ }
+
+-extern inline unsigned char rbits8(unsigned char w)
++static inline unsigned char rbits8(unsigned char w)
+ {
+ w = ((w >> 1) & 0x55) | ((w << 1) & 0xaa);
+ w = ((w >> 2) & 0x33) | ((w << 2) & 0xcc);
+@@ -71,7 +71,7 @@ extern inline unsigned char rbits8(unsigned char w)
+
+ /* ---------------------------------------------------------------------- */
+
+-extern inline float avg(float average, float input, int scale)
++static inline float avg(float average, float input, int scale)
+ {
+ int i;
+
+@@ -82,12 +82,12 @@ extern inline float avg(float average, float input, int scale)
+ return (average + input);
+ }
+
+-extern inline float avg2(float average, float input, float weight)
++static inline float avg2(float average, float input, float weight)
+ {
+ return input * weight + average * (1.0 - weight);
+ }
+
+-extern inline float phaseavg(float *data, int len)
++static inline float phaseavg(float *data, int len)
+ {
+ float sum = 0.0;
+ float min = M_PI;
+diff --git a/p3dmodem/genp3dtbl.c b/p3dmodem/genp3dtbl.c
+index 4d8fbd5..2360995 100644
+--- a/p3dmodem/genp3dtbl.c
++++ b/p3dmodem/genp3dtbl.c
+@@ -41,7 +41,7 @@
+
+ /* ---------------------------------------------------------------------- */
+
+-extern inline unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+diff --git a/pammodem/genpamtbl.c b/pammodem/genpamtbl.c
+index a466f4d..2b00253 100644
+--- a/pammodem/genpamtbl.c
++++ b/pammodem/genpamtbl.c
+@@ -104,7 +104,7 @@
+
+ /* ---------------------------------------------------------------------- */
+
+-extern __inline__ unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+diff --git a/pammodem/meas.c b/pammodem/meas.c
+index 5c2b61a..609e681 100644
+--- a/pammodem/meas.c
++++ b/pammodem/meas.c
+@@ -240,7 +240,7 @@ int sound_init(int sample_rate, int *sr)
+
+ /* ---------------------------------------------------------------------- */
+
+-extern __inline__ unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+diff --git a/pammodem/pammodem.c b/pammodem/pammodem.c
+index 92077a3..c4afc40 100644
+--- a/pammodem/pammodem.c
++++ b/pammodem/pammodem.c
+@@ -160,7 +160,7 @@ struct rxstate {
+ unsigned int rxptr;
+ };
+
+-extern inline int rxgsfir(const int16_t *buf, const int *coeff)
++static inline int rxgsfir(const int16_t *buf, const int *coeff)
+ {
+ unsigned int i;
+ int s;
+@@ -207,7 +207,7 @@ static void rxrewindsamples(struct rxstate *rx, unsigned int nr, unsigned int ts
+ rx->rxphase -= ph;
+ }
+
+-extern inline int calcsync(int *toten, int *corren, int16_t *samples)
++static inline int calcsync(int *toten, int *corren, int16_t *samples)
+ {
+ const int *tr = trainsyms;
+ unsigned int i;
+diff --git a/pskmodem/genpsktbl.c b/pskmodem/genpsktbl.c
+index 9612bc9..e8dd07d 100644
+--- a/pskmodem/genpsktbl.c
++++ b/pskmodem/genpsktbl.c
+@@ -106,7 +106,7 @@
+
+ /* ---------------------------------------------------------------------- */
+
+-extern __inline__ unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+diff --git a/pskmodem/measpsk.c b/pskmodem/measpsk.c
+index 88e0e36..d0a23de 100644
+--- a/pskmodem/measpsk.c
++++ b/pskmodem/measpsk.c
+@@ -271,7 +271,7 @@ int sound_init(int sample_rate, int *sr)
+
+ /* ---------------------------------------------------------------------- */
+
+-extern __inline__ unsigned int hweight32(unsigned int w)
++static inline unsigned int hweight32(unsigned int w)
+ {
+ unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
+ res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
+diff --git a/pskmodem/pskmlse.c b/pskmodem/pskmlse.c
+index 6fd1561..1649467 100644
+--- a/pskmodem/pskmlse.c
++++ b/pskmodem/pskmlse.c
+@@ -493,7 +493,7 @@ static void simdtrellis(unsigned int *nodemetric1, unsigned int *nodemetric2, un
+
+ #else
+
+-extern inline void simdtrellis(unsigned int *nodemetric1, unsigned int *nodemetric2, unsigned int *metrictab, unsigned short *backptr, int vr, int vi)
++static inline void simdtrellis(unsigned int *nodemetric1, unsigned int *nodemetric2, unsigned int *metrictab, unsigned short *backptr, int vr, int vi)
+ {
+ }
+
+@@ -582,7 +582,7 @@ static void simdinitmetric(const cplxshort_t *channel, metrictab_t *metrictab)
+
+ #else
+
+-extern inline void simdinitmetric(const cplxshort_t *channel, metrictab_t *metrictab)
++static inline void simdinitmetric(const cplxshort_t *channel, metrictab_t *metrictab)
+ {
+ }
+
+diff --git a/pskmodem/pskmodem.c b/pskmodem/pskmodem.c
+index ffb1668..4161bc2 100644
+--- a/pskmodem/pskmodem.c
++++ b/pskmodem/pskmodem.c
+@@ -262,7 +262,7 @@ static void rxrotate(cplxshort_t *ptr, unsigned int nr, unsigned int carphase, u
+ }
+ }
+
+-extern inline int calcsync(int *toten, int *corren, cplxshort_t *samples)
++static inline int calcsync(int *toten, int *corren, cplxshort_t *samples)
+ {
+ const cplxshort_t *tr = traincorrrotated;
+ unsigned int i;
+diff --git a/soundcard/modem.h b/soundcard/modem.h
+index b8c3a5f..375d07d 100644
+--- a/soundcard/modem.h
++++ b/soundcard/modem.h
+@@ -103,7 +103,7 @@ extern void logvprintf(unsigned int level, const char *fmt, va_list args);
+ extern void logprintf(unsigned int level, const char *fmt, ...);
+ extern void logerr(unsigned int level, const char *st);
+ extern unsigned int log_verblevel;
+-extern inline int logcheck(unsigned int vl)
++static inline int logcheck(unsigned int vl)
+ {
+ return vl <= log_verblevel;
+ }
+diff --git a/soundcard/simd.h b/soundcard/simd.h
+index 6b6ab3b..e49bdd7 100644
+--- a/soundcard/simd.h
++++ b/soundcard/simd.h
+@@ -54,16 +54,16 @@
+
+ #if !defined(USEMMX) && !defined(USEVIS)
+
+-extern inline void initsimd(int enable)
++static inline void initsimd(int enable)
+ {
+ }
+
+-extern inline int checksimd(void)
++static inline int checksimd(void)
+ {
+ return 0;
+ }
+
+-extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
++static inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
+ {
+ int s = 0;
+
+@@ -72,7 +72,7 @@ extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int n
+ return s;
+ }
+
+-extern inline void simdpreparefpu(void)
++static inline void simdpreparefpu(void)
+ {
+ }
+
+@@ -82,7 +82,7 @@ extern unsigned int simd_enabled;
+
+ extern void initsimd(int enable);
+
+-extern inline int checksimd(void)
++static inline int checksimd(void)
+ {
+ return simd_enabled;
+ }
+@@ -91,7 +91,7 @@ extern inline int checksimd(void)
+
+ #define MMXCLOBBER "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)"
+
+-extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
++static inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
+ {
+ unsigned int i, j;
+ int s = 0;
+@@ -114,7 +114,7 @@ extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int n
+ return s;
+ }
+
+-extern inline void simdpreparefpu(void)
++static inline void simdpreparefpu(void)
+ {
+ if (checksimd())
+ asm volatile("emms");
+@@ -122,7 +122,7 @@ extern inline void simdpreparefpu(void)
+
+ #elif defined(USEVIS)
+
+-/*extern inline*/static int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
++/*static inline*/static int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
+ {
+ double dsum1, dsum2, dsum3, dsum4, arg1, arg2, arg3, arg4;
+ float sum, sum1, sum2;
+@@ -157,7 +157,7 @@ extern inline void simdpreparefpu(void)
+ return s;
+ }
+
+-extern inline void simdpreparefpu(void)
++static inline void simdpreparefpu(void)
+ {
+ }
+
+--
+2.4.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2726e2c17e19
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Carsten Feuls <archlinux at carstenfeuls.de>
+pkgname=soundmodem-server
+_pkgname=soundmodem
+pkgver=0.18
+pkgrel=1
+pkgdesc="Multiplatform Soundcard Packet Radio Modem without configuration GUI"
+url="http://pv529.ncsrv.de/soundmodem/"
+license=('GPL2')
+provides="soundmodem"
+conflicts="soundmodem"
+source=("configure_ac.patch"
+ "0001-Search-replace-of-extern-inline-static-inline.patch"
+ "soundmodem.conf"
+ "soundmodem_conf.d"
+ "http://pv529.ncsrv.de/soundmodem/${_pkgname}-${pkgver}.tar.gz"
+ "soundmodem.service")
+arch=('i686' 'x86_64' 'armv5h' 'armv6h' 'armv7h')
+backup=('etc/ax25/soundmodem.conf'
+ 'etc/conf.d/soundmodem')
+depends=('audiofile' 'libxml2' 'alsa-lib')
+sha256sums=('c97f91b5ac9ad0b218a3d2de3b843cc934d6112da9df4c1c9b72d4f04fd03520'
+ '3a6e57ae1b89acbc25cb4758f2130e936f83fcec0aa1488f92f46c3d59e2d9b1'
+ '36ed996571e2b39c75b27a5f765527bdcc737c4d30a681983c8415f4c742b825'
+ '6719bc2d61dcf6edc4a8bcad4467a58696e0ce0f066badc39f6c0d47686cc2c3'
+ 'f033c1716df1378cda646dbb1c48ea9fb9a068772c6686f2ca411bfa64245c1c'
+ '3be5b647f4798ff93df84a02097f97223f00508e6d2031cdbf0ee5f85397de81')
+
+prepare() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+ if [ -d configapp ]
+ then
+ rm -r configapp
+ fi
+ mv configure.in configure.ac
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" afsk/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" directx/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" flexdrv/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" fsk/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" newqpsk/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" p3dmodem/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" pammodem/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" pskmodem/Makefile.am
+ sed -i "s/INCLUDES/AM_CPPFLAGS/g" soundcard/Makefile.am
+ sed -i "s/configapp\/src\/Makefile//g" configure
+ sed -i "s/configapp//g" Makefile.in
+ sed -i "s/configapp//g" Makefile.am
+ sed -i "s/configapp\/Makefile//g" configure.ac
+ sed -i "s/configapp\/src\/Makefile//g" configure.ac
+ patch -p0 < ../../configure_ac.patch
+ aclocal
+ autoconf
+ automake --add-missing
+ autoreconf
+ patch -p1 <$srcdir/0001-Search-replace-of-extern-inline-static-inline.patch
+}
+
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+
+ mkdir -p ${pkgdir}/etc/ax25
+ mkdir -p ${pkgdir}/etc/conf.d
+ mkdir -p ${pkgdir}/usr/lib/systemd/system
+ mkdir -p ${pkgdir}/usr/bin
+ install -m 644 ${srcdir}/soundmodem.conf ${pkgdir}/etc/ax25/soundmodem.conf
+ install -m 644 ${srcdir}/soundmodem_conf.d ${pkgdir}/etc/conf.d/soundmodem
+ install -m 644 ${srcdir}/soundmodem.service ${pkgdir}/usr/lib/systemd/system/soundmodem.service
+ mv ${pkgdir}/usr/sbin/soundmodem ${pkgdir}/usr/bin/soundmodem
+ rmdir ${pkgdir}/usr/sbin
+}
diff --git a/configure_ac.patch b/configure_ac.patch
new file mode 100644
index 000000000000..d9ae49dd335a
--- /dev/null
+++ b/configure_ac.patch
@@ -0,0 +1,36 @@
+--- configure.ac 2014-12-16 14:13:01.725298702 +0100
++++ configure.ac 2014-12-16 14:14:05.825300136 +0100
+@@ -137,31 +137,8 @@
+ LIBS="$LIBS -ldsound -lgdi32"
+ fi
+
+-if test x$cross_compiling = xyes; then
+- gtk=no
+- xlibs="$LIBS"
+- LIBS="$LIBS -L$CROSSCOMPPATH/gtk/lib"
+- AC_CHECK_LIB(gtk,gtk_main,gtk=yes)
+- LIBS="$xlibs"
+- if test x$gtk = xyes; then
+- GTK_CFLAGS="-I$CROSSCOMPPATH/gtk/include -I$CROSSCOMPPATH/gtk/include/glib -I$CROSSCOMPPATH/gtk/include/gdk"
+- GTK_LIBS="-L$CROSSCOMPPATH/gtk/lib -lgtk -lgdk -lglib"
+- PTHREAD_CFLAGS="-I$CROSSCOMPPATH/gtk/include"
+- PTHREAD_LIBS="-L$CROSSCOMPPATH/gtk/lib"
+- AUDIOFILE_CFLAGS="-I$CROSSCOMPPATH/audiofile/include"
+- AUDIOFILE_LIBS="-L$CROSSCOMPPATH/audiofile/lib -laudiofile"
+- fi
+-else
+- PKG_CHECK_MODULES(XML,libxml-2.0)
+- PKG_CHECK_MODULES(GTK,gtk+-2.0 >= 2.6.0)
+- PKG_CHECK_MODULES(AUDIOFILE,audiofile)
+-fi
+-
+-dnl Check for recently introduced GTK symbols
+-xlibs="$LIBS"
+-LIBS="$GTK_LIBS $LIBS"
+-AC_CHECK_FUNCS(gtk_widget_set_tooltip_text gtk_widget_is_drawable gtk_widget_get_realized gtk_widget_set_realized gtk_widget_set_can_default gtk_widget_set_can_focus gtk_dialog_get_action_area gtk_dialog_get_content_area gtk_widget_get_allocation gtk_widget_set_allocation gtk_widget_get_state gtk_widget_get_window gtk_widget_set_window gtk_widget_set_has_window gtk_widget_style_attach)
+-LIBS="$xlibs"
++PKG_CHECK_MODULES(XML,libxml-2.0)
++PKG_CHECK_MODULES(AUDIOFILE,audiofile)
+
+ dnl Enable to try building with XXX_DISABLE_DEPRECATED. Never ship with
+ dnl them enabled!
diff --git a/soundmodem.conf b/soundmodem.conf
new file mode 100644
index 000000000000..8af476b6c892
--- /dev/null
+++ b/soundmodem.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<modem/>
diff --git a/soundmodem.service b/soundmodem.service
new file mode 100644
index 000000000000..c9c010bb7a31
--- /dev/null
+++ b/soundmodem.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Soundmodem TNC
+
+[Service]
+EnvironmentFile=/etc/conf.d/soundmodem
+ExecStart=/usr/sbin/soundmodem $SOUNDMODEM_ARGS /etc/ax25/soundmodem.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/soundmodem_conf.d b/soundmodem_conf.d
new file mode 100644
index 000000000000..7670497f6a77
--- /dev/null
+++ b/soundmodem_conf.d
@@ -0,0 +1 @@
+SOUNDMODEM_ARGS=""