diff options
author | Max Falk | 2016-08-14 21:16:12 +0200 |
---|---|---|
committer | Max Falk | 2016-08-14 21:16:12 +0200 |
commit | fde0af89ce401a890dc9d8634f38b1392e6ea278 (patch) | |
tree | 52791ab2aa69e90269ec0f672b06c2e05ec5560f | |
download | aur-fde0af89ce401a890dc9d8634f38b1392e6ea278.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | atlassian-bitbucket.install | 20 | ||||
-rw-r--r-- | bitbucket.service | 15 | ||||
-rw-r--r-- | bitbucket.sysusers | 1 | ||||
-rw-r--r-- | bitbucket.tmpfiles | 2 | ||||
-rw-r--r-- | local.conf | 2 |
8 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..45413dd8d9a9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +# Generated by mksrcinfo v8 +# Sun Aug 14 19:15:01 UTC 2016 +pkgbase = atlassian-bitbucket + pkgdesc = Bitbucket Server + pkgver = 4.8.3 + pkgrel = 1 + url = https://www.atlassian.com/software/bitbucket/server + install = atlassian-bitbucket.install + arch = i686 + arch = x86_64 + license = custom + depends = java-runtime=8 + depends = git>=1.8.0 + depends = perl>=5.8.8 + backup = etc/systemd/system/bitbucket.service.d/local.conf + backup = etc/bitbucket/server.xml + source = https://atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-4.8.3.tar.gz + source = bitbucket.service + source = bitbucket.tmpfiles + source = bitbucket.sysusers + source = local.conf + sha256sums = 8f5544e8b9e6cb444df6ce401425ec308c380e317618c40d8895f6ebb2aa6328 + sha256sums = cdba0049a5ed6757aa469baa194383d51664f04f6a17e23e7f7e4935201ce629 + sha256sums = d7c7735e2b092b58c89c272ae1afe8122a51d2b8edc5c46ccdd470c29ef1cfc1 + sha256sums = 4fd916cab8d0004678fca749d45858e265d0ab698b7d3a6de038a62b72a7c17f + sha256sums = 487d9067e07aa741b2ef2ce52e81d506c962ab59d3c31fd4876d7a4ee53573e2 + +pkgname = atlassian-bitbucket + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4ad4e9154c29 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.pkg.tar +*.src.tar.gz +pkg/ +src/ +*.sw[op] +*.pkg.tar.xz +atlassian-bitbucket*.tar.gz +atlassian-bitbucket-*/ +*.part diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..48c640c86520 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +_pkgname=bitbucket +pkgname=atlassian-${_pkgname} +pkgver=4.8.3 +pkgrel=1 +pkgdesc="Bitbucket Server" +url="https://www.atlassian.com/software/${_pkgname}/server" +license=("custom") +arch=("i686" "x86_64") +depends=("java-runtime=8" + "git>=1.8.0" + "perl>=5.8.8") +backup=("etc/systemd/system/${_pkgname}.service.d/local.conf" + "etc/${_pkgname}/server.xml") +install="$pkgname.install" +source=("https://atlassian.com/software/stash/downloads/binary/${pkgname}-${pkgver}.tar.gz" + "${_pkgname}.service" + "${_pkgname}.tmpfiles" + "${_pkgname}.sysusers" + "local.conf") + +package() { + install -dm750 "$pkgdir/var/lib/${_pkgname}" + install -dm755 "$pkgdir/opt/$pkgname" + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" + cp -r "$srcdir/atlassian-${_pkgname}-$pkgver/licenses/"* "$pkgdir/usr/share/licenses/$pkgname" + cp -r "$srcdir/atlassian-${_pkgname}-$pkgver/"* "$pkgdir/opt/$pkgname" + install -Dm755 "$pkgdir/opt/$pkgname/conf/server.xml" "$pkgdir/etc/${_pkgname}/server.xml" + rm "$pkgdir/opt/$pkgname/conf/server.xml" + ln -s "/etc/${_pkgname}/server.xml" "$pkgdir/var/lib/${_pkgname}/server.xml" + # remove unneeded Windows files + find "$pkgdir/opt/$pkgname/bin" -name "*.bat" -type f -exec rm "{}" \; + find "$pkgdir/opt/$pkgname/bin" -name "*.exe" -type f -exec rm "{}" \; + + + # setup systemd service + install -Dm644 "$srcdir/${_pkgname}.service" "$pkgdir/usr/lib/systemd/system/${_pkgname}.service" + install -Dm644 "$srcdir/local.conf" "$pkgdir/etc/systemd/system/${_pkgname}.service.d/local.conf" + install -Dm644 "$srcdir/${_pkgname}.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/${_pkgname}.conf" + install -Dm644 "$srcdir/${_pkgname}.sysusers" "$pkgdir/usr/lib/sysusers.d/${_pkgname}.conf" +} + +sha256sums=('8f5544e8b9e6cb444df6ce401425ec308c380e317618c40d8895f6ebb2aa6328' + 'cdba0049a5ed6757aa469baa194383d51664f04f6a17e23e7f7e4935201ce629' + 'd7c7735e2b092b58c89c272ae1afe8122a51d2b8edc5c46ccdd470c29ef1cfc1' + '4fd916cab8d0004678fca749d45858e265d0ab698b7d3a6de038a62b72a7c17f' + '487d9067e07aa741b2ef2ce52e81d506c962ab59d3c31fd4876d7a4ee53573e2') diff --git a/atlassian-bitbucket.install b/atlassian-bitbucket.install new file mode 100644 index 000000000000..bc56c3549bbf --- /dev/null +++ b/atlassian-bitbucket.install @@ -0,0 +1,20 @@ +post_install() { + systemd-sysusers bitbucket.conf + systemd-tmpfiles --create bitbucket.conf + chown -R bitbucket:bitbucket /opt/atlassian-bitbucket /etc/bitbucket + chmod -R 750 /etc/bitbucket + echo "==> " + echo "==> Bitbucket has finished installing." + echo "==> Visit https://confluence.atlassian.com/display/BitbucketServer/Install+Bitbucket+Server+from+an+archive+file for configuration instructions." + echo "==> " +} + +post_upgrade() { + post_install + echo "Restart Bitbucket to complete upgrade." +} + +pre_remove() { + getent passwd bitbucket &>/dev/null && userdel bitbucket &> /dev/null + getent group bitbucket &>/dev/null && groupdel bitbucket &> /dev/null +} diff --git a/bitbucket.service b/bitbucket.service new file mode 100644 index 000000000000..cc91bd5fbab6 --- /dev/null +++ b/bitbucket.service @@ -0,0 +1,15 @@ +[Unit] +Description=Bitbucket Server by Atlassian +After=network.target + +[Service] +Type=forking +ExecStart=/opt/atlassian-bitbucket/bin/start-bitbucket.sh +ExecStop=/opt/atlassian-bitbucket/bin/stop-bitbucket.sh +PIDFile=/opt/atlassian-bitbucket/work/catalina.pid +KillSignal=SIGINT +LimitNOFILE=8196 + +[Install] +WantedBy=multi-user.target + diff --git a/bitbucket.sysusers b/bitbucket.sysusers new file mode 100644 index 000000000000..45af1c1b1249 --- /dev/null +++ b/bitbucket.sysusers @@ -0,0 +1 @@ +u bitbucket - "Atlassian Bitbucket Server" /var/lib/bitbucket diff --git a/bitbucket.tmpfiles b/bitbucket.tmpfiles new file mode 100644 index 000000000000..80c4b3f9cc7d --- /dev/null +++ b/bitbucket.tmpfiles @@ -0,0 +1,2 @@ +# See tmpfiles.d(5) for details +d /var/lib/crucible 0700 bitbucket bitbucket - diff --git a/local.conf b/local.conf new file mode 100644 index 000000000000..2cecd793935e --- /dev/null +++ b/local.conf @@ -0,0 +1,2 @@ +[Service] +Environment="BITBUCKET_HOME=/var/lib/bitbucket" |