diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | atlassian-crucible.install | 15 | ||||
-rw-r--r-- | crucible.conf.d | 1 | ||||
-rw-r--r-- | crucible.service | 14 | ||||
-rw-r--r-- | crucible.sysusers | 1 | ||||
-rw-r--r-- | crucible.tmpfiles | 4 |
8 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0d36c2cebb80 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +# Generated by mksrcinfo v8 +# Mon Dec 21 19:50:29 UTC 2015 +pkgbase = atlassian-crucible + pkgdesc = Enterprise code review + pkgver = 3.10.2 + pkgrel = 1 + url = https://www.atlassian.com/software/crucible + install = atlassian-crucible.install + arch = i686 + arch = x86_64 + license = custom + depends = java-runtime=8 + backup = etc/conf.d/crucible + backup = opt/atlassian-crucible/config.xml + source = https://www.atlassian.com/software/crucible/downloads/binary/crucible-3.10.2.zip + source = crucible.service + source = crucible.tmpfiles + source = crucible.sysusers + source = crucible.conf.d + sha256sums = 2470c3eb70080f660a9346dfb12f86ebd1f0bb1ff1a5ead319564a679d00d879 + sha256sums = 0c1960f323a9e65a96bbcfbcd48e7ca7705aba521fe40b584245fa22f9acca99 + sha256sums = 9a8d5dd8e9e9f2a5c335baf1b9757702b03bb90e5011729d09c6bf64401bbd95 + sha256sums = f0b37aacb84738e901a29bf0582ae1cd8ac352a80ffc348f8319909a7326f337 + sha256sums = b7e4d9da50776322381bbf31b03b4e05075a5983b383d07f8bcc470503198a4d + +pkgname = atlassian-crucible + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a82f4be06a77 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.pkg.tar +*.src.tar.gz +pkg/ +src/ +crucible/ +fecru-*/ +*.sw[op] +*.pkg.tar.xz +crucible*.zip diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a94e2d7b07ef --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Sam Whited <swhited@atlassian.com> +# Note that this package is in no way officially supported by Atlassian. +# TODO: Put the config elsewhere (/etc/crucible maybe?) + +pkgname=atlassian-crucible +pkgver=3.10.2 +pkgrel=1 +pkgdesc="Enterprise code review" +url="https://www.atlassian.com/software/crucible" +license=('custom') +arch=('i686' 'x86_64') +depends=('java-runtime=8') +backup=('etc/conf.d/crucible' + 'opt/atlassian-crucible/config.xml') +install='atlassian-crucible.install' +source=("https://www.atlassian.com/software/crucible/downloads/binary/crucible-$pkgver.zip" + 'crucible.service' + 'crucible.tmpfiles' + 'crucible.sysusers' + 'crucible.conf.d' +) +sha256sums=('2470c3eb70080f660a9346dfb12f86ebd1f0bb1ff1a5ead319564a679d00d879' + '0c1960f323a9e65a96bbcfbcd48e7ca7705aba521fe40b584245fa22f9acca99' + '9a8d5dd8e9e9f2a5c335baf1b9757702b03bb90e5011729d09c6bf64401bbd95' + 'f0b37aacb84738e901a29bf0582ae1cd8ac352a80ffc348f8319909a7326f337' + 'b7e4d9da50776322381bbf31b03b4e05075a5983b383d07f8bcc470503198a4d') + +package() { + mkdir -p "$pkgdir/opt/atlassian-crucible/" + cp -r "$srcdir/fecru-$pkgver/"* "$pkgdir/opt/atlassian-crucible/" + # remove unneeded Windows files + find "$pkgdir/opt/atlassian-crucible/bin" -name '*.bat' -type f -exec rm "{}" \; + find "$pkgdir/opt/atlassian-crucible/bin" -name '*.exe' -type f -exec rm "{}" \; + + # setup systemd service + install -dm755 "$pkgdir/usr/lib/systemd/system" + install -Dm644 "$srcdir/crucible.service" "$pkgdir/usr/lib/systemd/system" + install -Dm644 "$srcdir/crucible.conf.d" "$pkgdir/etc/conf.d/crucible" +} + diff --git a/atlassian-crucible.install b/atlassian-crucible.install new file mode 100644 index 000000000000..4d5cbd4e991f --- /dev/null +++ b/atlassian-crucible.install @@ -0,0 +1,15 @@ +post_install() { + post_upgrade +} + +post_upgrade() { + systemd-sysusers crucible.conf + systemd-tmpfiles --create crucible.conf + chown -R crucible:crucible /etc/crucible + chmod -R 750 /etc/crucible +} + +pre_remove() { + getent passwd crucible &>/dev/null && userdel crucible &> /dev/null + getent group crucible &>/dev/null && groupdel crucible &> /dev/null +} diff --git a/crucible.conf.d b/crucible.conf.d new file mode 100644 index 000000000000..f7e1668768af --- /dev/null +++ b/crucible.conf.d @@ -0,0 +1 @@ +FISHEYE_INST="/var/lib/crucible" diff --git a/crucible.service b/crucible.service new file mode 100644 index 000000000000..5bb0bdc45ea9 --- /dev/null +++ b/crucible.service @@ -0,0 +1,14 @@ +[Unit] +Description=Crucible code review tool by Atlassian +After=network.target + +[Service] +Type=forking +ExecStart=/opt/atlassian-crucible/bin/start.sh +ExecStop=/opt/atlassian-crucible/bin/stop.sh +KillSignal=SIGINT +LimitNOFILE=8196 + +[Install] +WantedBy=multi-user.target + diff --git a/crucible.sysusers b/crucible.sysusers new file mode 100644 index 000000000000..d5508d2a7636 --- /dev/null +++ b/crucible.sysusers @@ -0,0 +1 @@ +u crucible - "Atlassian Crucible" /var/lib/crucible diff --git a/crucible.tmpfiles b/crucible.tmpfiles new file mode 100644 index 000000000000..c122d263325c --- /dev/null +++ b/crucible.tmpfiles @@ -0,0 +1,4 @@ +# systemd tmpfile settings for minidlna +# See tmpfiles.d(5) for details + +d /var/lib/crucible 0700 crucible crucible - |