summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 34e995c46eda72ee9b34e3fb128f81464b440843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Runnytu < runnytu at gmail dot com >
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daenyth
# Contributor: Lyle Putnam <lcputnam@amerytel.net>

pkgname=noip
pkgver=2.1.9
pkgrel=7
pkgdesc='Dynamic DNS Client Updater for no-ip.com services'
arch=('x86_64' 'i686' 'armv7h' 'armv6h' 'aarch64')
url='http://www.no-ip.com/downloads.php?page=linux'
license=('GPL')
install="$pkgname.install"
depends=('glibc')
source=('http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz'
        'noip.service')
sha256sums=('82b9bafab96a0c53b21aaef688bf70b3572e26217b5e2072bdb09da3c4a6f593'
            'ab092b323eb6f86682ed18796d0b467acff8587206cc53a3cc90564608026389')

prepare() {
  cd "$pkgname-$pkgver-1"

  sed -i '/^#define CONFIG_FILEPATH/s/PREFIX//' noip2.c
  sed -i '/^#define CONFIG_FILENAME/s/PREFIX//' noip2.c
}

build() {
  cd "$pkgname-$pkgver-1"

  cc -Wall $CLFAGS $LDFLAGS -g -Dlinux -DPREFIX=/usr noip2.c -o noip2 -Wno-unused-but-set-variable
}

package() {
  cd "$pkgname-$pkgver-1"

  install -Dm755 noip2 "$pkgdir/usr/bin/noip2"
  install -Dm644 "$srcdir/$pkgname.service" \
    "$pkgdir/usr/lib/systemd/system/noip2.service"
}