blob: 3fe1b26d1d48253dff274cf01d28a3401c5a43e0 (
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
|
_gitname="Sonarr"
_gitver="2.0.0"
_gitbranch="develop"
pkgname="sonarr-git"
pkgver=2.0.0.r6032
pkgrel=1
pkgdesc="Smart PVR for newsgroup and bittorrent users"
arch=(any)
url="https://sonarr.tv"
license=('GPL3')
depends=('mono' 'libmediainfo' 'sqlite')
makedepends=('git' 'nodejs')
install='sonarr.install'
provides=('sonarr')
conflicts=('sonarr' 'sonarr-develop')
options=('!strip')
source=("git://github.com/Sonarr/Sonarr.git#branch=${_gitbranch}"
"sonarr.sh"
"sonarr.service"
"sonarr.install")
md5sums=(SKIP
SKIP
SKIP
SKIP)
pkgver() {
cd "${_gitname}"
# FIXME May deviate from actual version
printf "${_gitver}.r%s" "$(git rev-list --count HEAD)"
}
prepare() {
cd "${_gitname}"
# XXX Git for some reason complains if identity is not already set
git config user.email "you@example.com"
git config user.name "Your Name"
msg2 "Rebasing using pull request (https://github.com/Sonarr/Sonarr/pull/202)"
git fetch origin pull/202/head:XBuild-support
git rebase --onto XBuild-support "origin/${_gitbranch}" --force-rebase --ignore-whitespace
}
build() {
cd "${_gitname}"
npm install
fakeroot mozroots --import --machine --sync
MONO_IOMAP=case xbuild src/NzbDrone.sln /t:Configuration=Release /t:Build
node node_modules/gulp/bin/gulp.js build
}
package() {
msg2 "Remove native Windows binaries"
find "${_gitname}/_output/" \( \
-name "ServiceUninstall.*" \
-o -name "ServiceInstall.*" \
-o -name "sqlite3.*" \
-o -name "MediaInfo.*" \
-o -name "NzbDrone.Windows.*" \
\) -type f -delete
msg2 "Replacing main executable with console variant"
mv -f "${_gitname}/_output/NzbDrone.Console.exe" "${_gitname}/_output/NzbDrone.exe"
install -d -m 755 "${pkgdir}/var/lib/sonarr"
msg2 "Install Sonarr in /usr/lib"
install -d -m 755 "${pkgdir}/usr/lib"
mv -f "${_gitname}/_output/" "${pkgdir}/usr/lib/sonarr/"
msg2 "Install executable into /usr/bin"
install -D -m755 "${srcdir}/sonarr.sh" "${pkgdir}/usr/bin/sonarr"
msg2 "Install sonarr.service"
install -D -m 644 "${srcdir}/sonarr.service" "${pkgdir}/usr/lib/systemd/system/sonarr.service"
}
|