diff options
author | Lars Johnsen | 2015-02-26 03:59:40 +0100 |
---|---|---|
committer | Lars Johnsen | 2015-06-05 12:30:51 +0200 |
commit | d5b8f155e07648273385f9c2aca058667e4ca6db (patch) | |
tree | 66209ad9cc950a80b388da1c14222356677ddfcf /PKGBUILD | |
parent | 408a397cb2988487b07a402c984163ff47191fde (diff) | |
download | aur-d5b8f155e07648273385f9c2aca058667e4ca6db.tar.gz |
New patch + misc changes
This reverts commit 408a397cb2988487b07a402c984163ff47191fde.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 87 |
1 files changed, 59 insertions, 28 deletions
@@ -1,46 +1,81 @@ _gitname="Sonarr" _gitver="2.0.0" _gitbranch="develop" + +# NB: Only for pull requests in origin +_git_patches="" +_git_patches+="210:compile-linux " +_git_patches+="211:mono-processname " + pkgname="sonarr-git" -pkgver=2.0.0.r6043 +pkgver=2.0.0.r6121 pkgrel=1 -pkgdesc="Smart PVR for newsgroup and bittorrent users" +pkgdesc="Automated TV series manager and downloader (PVR) - git branch ${_gitbranch}" arch=(any) url="https://sonarr.tv" license=('GPL3') -depends=('mono' 'libmediainfo' 'sqlite') -makedepends=('git' 'nodejs') -install='sonarr.install' +groups=() +depends=('mono' + 'libmediainfo' + 'sqlite') +makedepends=('git' + 'nuget-cert' + 'npm' + 'nodejs') +optdepends=() provides=('sonarr') -conflicts=('sonarr' 'sonarr-develop') +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") -md5sums=(SKIP - SKIP - SKIP - SKIP) +sha256sums=('SKIP' + 'd594c4d5ad3c1b196a00cb9f005d4917ad4d8bb2ebf501010e8be7f349b3caa6' + '579d37819eb2df8ceefae474000bb3622a1ca9f13c9bbe8ebe2882bcc47ab187' + '7e9c1c5b5114355f4016b8c248975af19dbe40be086c1d4a555b61aac3386169') pkgver() { cd "${_gitname}" # FIXME May deviate from actual version - printf "${_gitver}.r%s" "$(git rev-list --count HEAD)" + printf "${_gitver}.r%s" "$(git rev-list --count ${_gitbranch})" } -build() { +prepare() { cd "${_gitname}" + # Install necessary nodejs libraries 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 + + # 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 +} + +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() { - msg2 "Remove native Windows binaries" find "${_gitname}/_output/" \( \ -name "ServiceUninstall.*" \ -o -name "ServiceInstall.*" \ @@ -49,18 +84,14 @@ package() { -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 "${pkgdir}/var/lib/sonarr" - install -d -m 755 "${pkgdir}/var/lib/sonarr" + install -Dm755 "sonarr.sh" "${pkgdir}/usr/bin/sonarr" + install -Dm644 "sonarr.service" "${pkgdir}/usr/lib/systemd/system/sonarr.service" - 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" + 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 {} \; } |