summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d54a22fb86633e08102bc80cf7a9f58f876fd62f (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
# Maintainer: SZanko, szanko at protonmail dot com

_pkgname=libreddit
pkgname=${_pkgname}-bin
pkgver=0.20.2
pkgrel=1
pkgdesc='An alternative private front-end to Reddit'
arch=('x86_64')
url="https://github.com/spikecodes/libreddit"
makedepends=('sed')
license=('AGPL') 
options=('!strip' '!emptydirs')
source=(
  "${_pkgname}-${pkgver}::${url}/releases/download/v${pkgver}/${_pkgname}"
  "https://raw.githubusercontent.com/spikecodes/${_pkgname}/v${pkgver}/contrib/${_pkgname}.service"
  "https://raw.githubusercontent.com/spikecodes/${_pkgname}/v${pkgver}/contrib/${_pkgname}.conf")
sha512sums=(
  'e3d68036fc0c18ee736b2aa7caa2cb3c60cceca6989060c5c176090c3cd754b91662fadb9fac0ead06dfc9233e16722daf611c8f4c9f215750907e834bf588de'
  '13f92ce4b522b9de3ca80518d0f0212808c497d0d428518697149f8737bec6d4d02f616af81fa67475c60fc87d6373c9af573ed3624ba352736587c25ef5e55e'
  '5dd9ad006cb628559d1b906d5e5874179a14d481be99bc4f5d3407a160a9729eb4fe87d9dae51f68cbc98c56ad13dcaebb350765c798b57aade794ba333ba5e7'
)
provides=("${_pkgname}")
conflicts=("${_pkgname}")

package() {
  sed -i '1s/localhost/0.0.0.0/g' ${_pkgname}.conf
  sed -i '2s/12345/8080/g' ${_pkgname}.conf
  install -Dm644 "${_pkgname}.conf" "$pkgdir/etc/${_pkgname}.conf"
  install -Dm644 "${_pkgname}.service" "$pkgdir/lib/systemd/system/${_pkgname}.service"
  install -Dm755 "${_pkgname}-${pkgver}" "$pkgdir/usr/bin/${_pkgname}"
}