diff options
author | Lars Johnsen | 2015-02-19 20:47:41 +0100 |
---|---|---|
committer | Lars Johnsen | 2015-02-23 01:46:21 +0100 |
commit | 027a91ff1dd2545cfa4cd7a3dddff5abeac26f7d (patch) | |
tree | dc6e9d1945f914cf4d1d2056c7f752cb7ea417c0 /PKGBUILD | |
download | aur-027a91ff1dd2545cfa4cd7a3dddff5abeac26f7d.tar.gz |
Initial
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..3fe1b26d1d48 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,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" +} |