1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # Using a binary ebuild until a source ebuild is doable.
6 # This is currently blocked by two major bugs upstream:
7 # A lack of documented build instructions - https://www.jfrog.com/jira/browse/RTFACT-8960
8 # A lack of source releases - https://www.jfrog.com/jira/browse/RTFACT-8961
18 DESCRIPTION="The world's most advanced repository manager for maven"
19 HOMEPAGE="http://www.jfrog.org/products.php"
20 SRC_URI="https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-oss-${MY_PV}.zip -> ${MY_P}.zip"
24 KEYWORDS="~x86 ~amd64"
27 RDEPEND=">=virtual/jre-1.8"
28 DEPEND=">=virtual/jdk-1.8
31 S="${WORKDIR}/${MY_PN}-oss-${MY_PV}"
35 enewuser artifactory -1 /bin/sh -1 artifactory
42 cp "${FILESDIR}/artifactory.xml" tomcat/conf/Catalina/localhost/artifactory.xml || die
43 cp "${FILESDIR}/server.xml" tomcat/conf/server.xml || die
46 # Reverse https://www.jfrog.com/jira/browse/RTFACT-7123
47 sed -i -e "s%artifactory.repo.global.disabled=true%artifactory.repo.global.disabled=false%g;" \
48 etc/artifactory.system.properties || die
50 # See FIXME in src_install(), this can probably go away,
51 # but catalina.sh may need to be fixed for that:
52 sed -i -e "s%/etc/opt/jfrog/artifactory/default%/etc/conf.d/${MY_PN}%g;" \
53 misc/service/setenv.sh || die
57 local ARTIFACTORY_HOME="/opt/artifactory"
58 local TOMCAT_HOME="${ARTIFACTORY_HOME}/tomcat"
60 insinto ${ARTIFACTORY_HOME}
61 doins -r etc logs misc tomcat webapps
64 dosym ${ARTIFACTORY_HOME}/etc /etc/opt/jfrog/artifactory
66 dosym ${ARTIFACTORY_HOME}/logs /var/log/artifactory
68 exeinto ${ARTIFACTORY_HOME}/bin
71 # FIXME: this is called by catalina.sh (it echoes the variables before starting
72 # artifactory, as well as makes sure log dir, etc. exists). Those directories
73 # could probably be moved to the ebuild and the script removed from catalina.sh
74 # without consequence (and quieter starts). Would need to check if CATALINA_*
75 # variables are actually used anywhere (from reading code don't appear to be
77 exeinto ${TOMCAT_HOME}/bin
78 doexe misc/service/setenv.sh
81 keepdir ${ARTIFACTORY_HOME}/backup
82 keepdir ${ARTIFACTORY_HOME}/data
83 keepdir ${ARTIFACTORY_HOME}/run
84 keepdir ${ARTIFACTORY_HOME}/work
85 keepdir ${TOMCAT_HOME}/logs/catalina
86 keepdir ${TOMCAT_HOME}/temp
87 keepdir ${TOMCAT_HOME}/work
88 keepdir /var/opt/jfrog/artifactory/run
90 newconfd "${FILESDIR}/confd" ${MY_PN}
91 newinitd "${FILESDIR}/initd" ${MY_PN}
93 fowners -R artifactory:artifactory ${ARTIFACTORY_HOME}
94 fperms -R u+w ${TOMCAT_HOME}/work