summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e5ab549703927e2947782c73b084c6696ff0449c (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
# Maintainer: Viktor Ricci <ricci@primateer.de>

pkgname=('poddl-git')
_gitname=('poddl')
pkgver=2023.10.16
pkgrel=1
pkgdesc="Podcast Downloader - Download all podcasts / episodes from an RSS-feed"
url="https://github.com/freshe/poddl"
license=('MIT')
source=('git+https://github.com/freshe/poddl.git')
b2sums=('SKIP')
arch=('x86_64')
depends=('gcc-libs' 'glibc' 'curl')
makedepends=('git')
checkdepends=()
provides=('poddl')
conflicts=('poddl')
_sample_rss='https://gist.githubusercontent.com/rodydavis/d0cb7a53d8deb42e92ae803a9dd48dbc/raw/94c3a5bef2c662122d3663e0c27e7db2d7fe2cd7/podcast_rss_feed.xml'

pkgver(){
    cd "${srcdir}/${_gitname}"
    grep -hoP '#define VERSION "\K[^"]+' *.cpp *.hpp
}

build(){
    cd "${srcdir}/${_gitname}"
    g++ *.cpp -O2 -std=c++11 -lcurl -o "${_gitname}"
}

check(){
    cd "${srcdir}/${_gitname}"
    ./"${_gitname}" "${_sample_rss}" -l
}

package(){
    cd "${srcdir}/${_gitname}"
    install -Dm755 "${_gitname}" "${pkgdir}/usr/bin/${_gitname}"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}