blob: 3d060af9929270c42df79f4262ba4a3068d7d04b (
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
|
_gitname="Sonarr"
_gitver="2.0.0"
_gitbranch="develop"
# NB: Only for pull requests in origin
_git_patches=""
_git_patches+="783:mono-process-name "
pkgname="sonarr-git"
pkgver=2.0.0.r6485
pkgrel=1
pkgdesc="Automated TV series manager and downloader - git branch ${_gitbranch}"
arch=(any)
url="https://sonarr.tv"
license=('GPL3')
groups=()
depends=('mono'
'libmediainfo'
'sqlite')
makedepends=('git'
'npm'
'nodejs')
optdepends=()
provides=('sonarr')
conflicts=('sonarr'
'sonarr-develop')
replaces=()
backup=()
options=('!strip')
install='sonarr.install'
changelog=
source=("git://github.com/Sonarr/Sonarr.git#branch=${_gitbranch}"
"sonarr.sh"
"sonarr.service"
"sonarr.install")
sha256sums=('SKIP'
'd594c4d5ad3c1b196a00cb9f005d4917ad4d8bb2ebf501010e8be7f349b3caa6'
'579d37819eb2df8ceefae474000bb3622a1ca9f13c9bbe8ebe2882bcc47ab187'
'7e9c1c5b5114355f4016b8c248975af19dbe40be086c1d4a555b61aac3386169')
pkgver() {
cd "${_gitname}"
# FIXME May deviate from actual version
printf "${_gitver}.r%s" "$(git rev-list --count ${_gitbranch})"
}
prepare() {
cd "${_gitname}"
# Install necessary nodejs libraries
npm install
# Git complains if user is not already set
[[ `git config user.email` ]] || git config user.email "you@example.com"
[[ `git config user.name` ]] || git config user.name "Your Name"
for patch in ${_git_patches}; do
id=`echo ${patch} | cut -d \: -f 1`
name=`echo ${patch} | cut -d \: -f 2`
msg2 "Patching ${name} from (https://github.com/Sonarr/Sonarr/pull/${id}"
git fetch origin pull/${id}/head:${name} --force
git rebase ${name} --force-rebase --ignore-whitespace --quiet
done
git submodule update --init
}
build() {
cd "${_gitname}"
export MONO_IOMAP=case
xbuild ./src/NzbDrone.sln /t:Configuration=Release /t:Build
node ./node_modules/gulp/bin/gulp.js build
}
package() {
find "${_gitname}/_output/" \( \
-name "ServiceUninstall.*" \
-o -name "ServiceInstall.*" \
-o -name "sqlite3.*" \
-o -name "MediaInfo.*" \
-o -name "NzbDrone.Windows.*" \
\) -type f -delete
install -d "${pkgdir}/var/lib/sonarr"
install -Dm755 "sonarr.sh" "${pkgdir}/usr/bin/sonarr"
install -Dm644 "sonarr.service" "${pkgdir}/usr/lib/systemd/system/sonarr.service"
install -d "${pkgdir}/opt/sonarr"
cp -a "${_gitname}/_output/"* "${pkgdir}/opt/sonarr"
find "${pkgdir}/opt/sonarr" -type d -exec chmod 755 {} \;
find "${pkgdir}/opt/sonarr" -type f -exec chmod 644 {} \;
find "${pkgdir}/opt/sonarr" -name \*.exe -type f -exec chmod 755 {} \;
}
|