summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Stengele2018-02-11 20:33:45 +0100
committerDennis Stengele2018-02-11 20:33:45 +0100
commit3ca36f1790d1ffe266023a030aa9182dc4794f9d (patch)
tree19f94cd0b5cd91af622aed67fcc29f8806b3a546
downloadaur-3ca36f1790d1ffe266023a030aa9182dc4794f9d.tar.gz
Initial commit for enterprise version
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD54
-rw-r--r--confluence.conf.d1
-rw-r--r--confluence.install16
-rw-r--r--confluence.service42
5 files changed, 134 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8630c4a211c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = atlassian-confluence
+ pkgdesc = Enterprise wiki
+ pkgver = 6.6.2
+ pkgrel = 1
+ url = https://www.atlassian.com/software/confluence
+ install = confluence.install
+ arch = any
+ license = custom
+ depends = jdk8
+ optdepends = mysql-connector-java: connect to MySQL
+ backup = etc/conf.d/confluence
+ backup = etc/webapps/atlassian-confluence/server.xml
+ source = http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-6.6.2.tar.gz
+ source = confluence.conf.d
+ source = confluence.service
+ sha256sums = 92a4448c4a9a3f35bb4acca6a920ac714a48fb476a817ad9b5f7e24e796239e7
+ sha256sums = a6304ba13a8ab1e27761bd3be71d05d2c2e3d61ea308316f4a04723ea4b30fc1
+ sha256sums = d51ad7cb3eb8a4d5553a26fd5567867345bb4ae9a10876fc2bee7b6ab8800824
+
+pkgname = atlassian-confluence
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bf6eb9f3526
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Dennis S. <dennis@stengele.me>
+# Contributor: Sebastien Bariteau <numkem@gmail.com>
+# Contributor: Vlad M. <vlad@archlinux.net>
+
+pkgname=atlassian-confluence
+pkgver=6.6.2
+pkgrel=1
+pkgdesc="Enterprise wiki"
+url="https://www.atlassian.com/software/confluence"
+license=('custom')
+arch=('any')
+depends=('jdk8')
+optdepends=('mysql-connector-java: connect to MySQL')
+backup=('etc/conf.d/confluence'
+ 'etc/webapps/atlassian-confluence/server.xml')
+install='confluence.install'
+source=("http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-$pkgver.tar.gz"
+ 'confluence.conf.d'
+ 'confluence.service')
+sha256sums=('92a4448c4a9a3f35bb4acca6a920ac714a48fb476a817ad9b5f7e24e796239e7'
+ 'a6304ba13a8ab1e27761bd3be71d05d2c2e3d61ea308316f4a04723ea4b30fc1'
+ 'd51ad7cb3eb8a4d5553a26fd5567867345bb4ae9a10876fc2bee7b6ab8800824')
+
+package() {
+ mkdir -p "$pkgdir/opt/atlassian-confluence/"
+ cp -r "$srcdir/atlassian-confluence-$pkgver/"* "$pkgdir/opt/atlassian-confluence/"
+
+ # Copy License
+ mkdir -p "${pkgdir}/usr/share/licenses/atlassian-confluence"
+ cp "${pkgdir}/opt/atlassian-confluence/LICENSE" "${pkgdir}/usr/share/licenses/atlassian-confluence/LICENSE"
+
+ # remove unneeded files
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.bat' -type f -exec rm "{}" \;
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.exe' -type f -exec rm "{}" \;
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.dll' -type f -exec rm "{}" \;
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.x64' -type f -exec rm "{}" \;
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.sh' -type f -exec rm "{}" \;
+ find "$pkgdir/opt/atlassian-confluence/bin" -name '*.command' -type f -exec rm "{}" \;
+
+ # Set home dir
+ echo "confluence.home=/var/opt/atlassian-confluence" > "$pkgdir/opt/atlassian-confluence/confluence/WEB-INF/classes/confluence-init.properties"
+
+ # Move server.xml to /etc and create symlink
+ mkdir -p "${pkgdir}/etc/webapps/atlassian-confluence"
+ mv "${pkgdir}/opt/atlassian-confluence/conf/server.xml" "${pkgdir}/etc/webapps/atlassian-confluence/server.xml"
+ ln -s "/etc/webapps/atlassian-confluence/server.xml" "${pkgdir}/opt/atlassian-confluence/conf/server.xml"
+
+ # Create home directory
+ install -dm755 "$pkgdir/var/opt/atlassian-confluence"
+
+ # Install systemd unit
+ install -Dm644 "$srcdir/confluence.service" "$pkgdir/usr/lib/systemd/system/confluence.service"
+ install -Dm644 "$srcdir/confluence.conf.d" "$pkgdir/etc/conf.d/confluence"
+}
diff --git a/confluence.conf.d b/confluence.conf.d
new file mode 100644
index 00000000000..46b80a39a84
--- /dev/null
+++ b/confluence.conf.d
@@ -0,0 +1 @@
+JAVA_OPTS="-Xms1024M -Xmx1024M"
diff --git a/confluence.install b/confluence.install
new file mode 100644
index 00000000000..94a09c68b26
--- /dev/null
+++ b/confluence.install
@@ -0,0 +1,16 @@
+post_install() {
+ if ! getent passwd confluence > /dev/null; then
+ useradd -r confluence
+ fi
+
+ chown -R confluence:confluence /opt/atlassian-confluence/{logs,temp,webapps,work,conf} /var/opt/atlassian-confluence
+}
+
+pre_upgrade() {
+ systemctl stop confluence.service
+}
+
+post_upgrade() {
+ chown -R confluence:confluence /opt/atlassian-confluence/{logs,temp,webapps,work,conf} /var/opt/atlassian-confluence
+ systemctl start confluence.service
+}
diff --git a/confluence.service b/confluence.service
new file mode 100644
index 00000000000..928af32319f
--- /dev/null
+++ b/confluence.service
@@ -0,0 +1,42 @@
+[Unit]
+Description=Atlassian Confluence Service
+After=syslog.target network.target
+
+[Service]
+User=confluence
+Type=simple
+SyslogIdentifier=confluence
+Environment="CATALINA_HOME=/opt/atlassian-confluence"
+Environment="CATALINA_BASE=/opt/atlassian-confluence"
+Environment="CATALINA_TMPDIR=/opt/atlassian-confluence/temp"
+Environment="JAVA_HOME=/usr/lib/jvm/default"
+Environment="CLASSPATH=/opt/atlassian-confluence/bin/bootstrap.jar:/opt/atlassian-confluence/bin/tomcat-juli.jar"
+EnvironmentFile=-/etc/conf.d/confluence
+SuccessExitStatus=143
+
+ExecStart=/usr/bin/env ${JAVA_HOME}/bin/java \
+$JAVA_OPTS $CATALINA_OPTS \
+-classpath ${CLASSPATH} \
+-Dcatalina.base=${CATALINA_BASE} \
+-Dcatalina.home=${CATALINA_HOME} \
+-Djava.endorsed.dirs=${JAVA_ENDORSED_DIRS} \
+-Djava.io.tmpdir=${CATALINA_TMPDIR} \
+-Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties \
+-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+org.apache.catalina.startup.Bootstrap \
+start
+
+ExecStop=/usr/bin/env ${JAVA_HOME}/bin/java \
+$JAVA_OPTS \
+-classpath ${CLASSPATH} \
+-Dcatalina.base=${CATALINA_BASE} \
+-Dcatalina.home=${CATALINA_HOME} \
+-Djava.endorsed.dirs=${JAVA_ENDORSED_DIRS} \
+-Djava.io.tmpdir=${CATALINA_TMPDIR} \
+-Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties \
+-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+org.apache.catalina.startup.Bootstrap \
+stop
+
+[Install]
+WantedBy=multi-user.target