summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: afac51624901efd5dc627ad94e0b42473e342c81 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Maintainer:  Robert Falkenberg <robert.falkenberg (at) tu-dortmund.de>
# Contributor: dreieck (https://aur.archlinux.org/account/dreieck)
# Contributor: Robert Falkenberg <robert.falkenberg (at) tu-dortmund.de>
# Contributor: sgar <swhaat at github>
# Contributor: Philipp Wolfer <ph.wolfer (at) gmail.com>
# Contributor: Jens Rudolf <jens.rudolf (at) gmx.net>

_pkgname=librm
pkgname="${_pkgname}"
pkgver=2.3.4
pkgrel=1
pkgdesc="Offers FRITZ!Box related core functionality for Roger Router (GUI), Roger CLI (CLI) and Roger Rabbit (ncurses) interfaces."
arch=(
  'aarch64'
  'x86_64'
  'i686'
  'pentium4'
  'armv5h'
  'armv6h'
  'armv7h'
)
url="https://gitlab.com/tabos/librm"
license=('LGPL-2.1-only')

depends=(
  'gdk-pixbuf2'
  'gcc-libs'
  'glib2'
  'glibc'
  'gst-plugins-base-libs'
  'gstreamer'
  'json-glib'
  'libcapi'
  'libgssdp-1.2.so'
  'libgupnp-1.2.so'
  'libsecret'
  'libsndfile'
  'libsoup'
  'libtiff'
  'libxml2'
  'spandsp'
  'speex'
)
makedepends=(
  'git'
  'gdk-pixbuf2'
  'gettext'
  'gtk-doc'   # To build GTK documentation.
  'gssdp-1.2'
  'gupnp-1.2'
  'meson'
  'ninja'
  'speex'
)
optdepends=(
  "dconf: For provided glib schemas."
)
provides=(
  "librm.so"
  "${_pkgname}-doc=${pkgver}"
)
conflicts=(
  "librm.so"
  "${_pkgname}-doc"
)
source=(
  "${_pkgname}::git+https://gitlab.com/tabos/librm.git#tag=${pkgver}"
)
sha256sums=(
  '5421586f7e4f03f95cb147bb02287543522650996efbee4a580c211b1347cfb6'
)
options+=('!emptydirs')

_CFLAGSADDITIONS="-w"

prepare() {
  CFLAGS+=" ${_CFLAGSADDITIONS}"
  CXXFLAGS+=" ${_CFLAGSADDITIONS}"
  export CFLAGS
  export CXXFLAGS

  cd "${srcdir}"

  arch-meson "${_pkgname}" build --reconfigure \
    -Denable-documentation=true \
    -Denable-secret=true

  cd "${srcdir}/${_pkgname}"
  git log > git.log
}

build() {
  CFLAGS+=" ${_CFLAGSADDITIONS}"
  CXXFLAGS+=" ${_CFLAGSADDITIONS}"
  export CFLAGS
  export CXXFLAGS

  cd "${srcdir}"

  ninja -v -j1 -C "build"
}

check() {
  CFLAGS+=" ${_CFLAGSADDITIONS}"
  CXXFLAGS+=" ${_CFLAGSADDITIONS}"
  export CFLAGS
  export CXXFLAGS

  cd "${srcdir}"

  ninja -v -C "build" test
}

package() {
  CFLAGS+=" ${_CFLAGSADDITIONS}"
  CXXFLAGS+=" ${_CFLAGSADDITIONS}"
  export CFLAGS
  export CXXFLAGS

  cd "${srcdir}"

  DESTDIR="${pkgdir}" ninja -v -C "build" install

  install -dvm755 "${pkgdir}/usr/share/doc/${_pkgname}"
  ln -svr "${pkgdir}/usr/share/gtk-doc/html/rm"  "${pkgdir}/usr/share/doc/${_pkgname}/html"

  cd "${srcdir}/${_pkgname}"

  install -Dvm644 -t "${pkgdir}/usr/share/doc/${_pkgname}"      git.log README.md TODO
  install -Dvm644 -t "${pkgdir}/usr/share/licenses/${pkgname}"  LICENSE
}