makedeb


libreddit-bin 0.22.9-1


An alternative private front-end to Reddit

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for libreddit-bin.

# Maintainer: SZanko, szanko at protonmail dot com

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

package() {
  sed -i '2s/12345/8080/g' ${_pkgname}-${pkgver}.conf
  sed -i '19s/P/#P/g' ${_pkgname}-${pkgver}.service
  sed -i '21s/P/#P/g' ${_pkgname}-${pkgver}.service
  sed -i '22s/P/#P/g' ${_pkgname}-${pkgver}.service
  sed -i '26s/P/#P/g' ${_pkgname}-${pkgver}.service
  sed -i '27s/Protec/#Protec/g' ${_pkgname}-${pkgver}.service
  install -Dm644 "${_pkgname}-${pkgver}.conf" "$pkgdir/etc/${_pkgname}.conf"
  install -Dm644 "${_pkgname}-${pkgver}.service" "$pkgdir/lib/systemd/system/${_pkgname}.service"
  install -Dm755 "${_pkgname}-${pkgver}" "$pkgdir/usr/bin/${_pkgname}"
}