2014-01-22 21:09:57 +01:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2011-11-12 19:21:01 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
2011-11-19 17:30:05 +01:00
|
|
|
EAPI=4
|
2011-11-12 19:21:01 +01:00
|
|
|
|
|
|
|
JAVA_PKG_IUSE="source"
|
|
|
|
|
|
|
|
inherit java-pkg-2 java-ant-2 eutils rpm
|
|
|
|
|
2012-04-20 03:09:03 +02:00
|
|
|
RPM_VER="1.1"
|
2014-01-22 21:09:57 +01:00
|
|
|
OPSI="opsi40-testing"
|
|
|
|
SUSE="openSUSE_13.1"
|
2011-11-12 19:21:01 +01:00
|
|
|
|
|
|
|
DESCRIPTION="opsi depot server"
|
|
|
|
HOMEPAGE="http://opsi.org/"
|
2014-01-22 21:09:57 +01:00
|
|
|
SRC_URI="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/${OPSI}/${SUSE}/src/${P}-${RPM_VER}.src.rpm"
|
2011-11-12 19:21:01 +01:00
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
IUSE=""
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
|
|
|
|
COMMON_DEP="dev-java/swingx:1.6"
|
2011-11-19 17:30:05 +01:00
|
|
|
RDEPEND=">=virtual/jre-1.6
|
2011-11-12 19:21:01 +01:00
|
|
|
${COMMON_DEP}"
|
2011-11-19 17:30:05 +01:00
|
|
|
DEPEND=">=virtual/jdk-1.6
|
2011-11-12 19:21:01 +01:00
|
|
|
${COMMON_DEP}"
|
|
|
|
RESTRICT=""
|
|
|
|
SLOT="0"
|
|
|
|
|
2011-11-19 17:30:05 +01:00
|
|
|
java_prepare() {
|
2011-11-12 19:21:01 +01:00
|
|
|
rm -rf *.jar
|
|
|
|
mv classes build
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
ejavac -encoding UTF-8 -sourcepath src -classpath $(java-pkg_getjars swingx-1.6) -d build src/de/uib/configed/configed.java
|
|
|
|
ejavac -encoding UTF-8 -sourcepath src -classpath $(java-pkg_getjars swingx-1.6) -d build src/de/uib/configed/configedApplet.java
|
|
|
|
ejavac -encoding UTF-8 javainfo.java
|
|
|
|
jar -cvfm configed.jar MANIFEST.MF -C build/ .
|
2013-04-17 08:48:39 +02:00
|
|
|
|
|
|
|
# get the swingx.jar for the java webstart into the right place
|
|
|
|
cp "${ROOT}"/usr/share/swingx-1.6/lib/swingx.jar .
|
|
|
|
|
|
|
|
rm -rf keystore
|
|
|
|
cat /dev/urandom | tr -dc A-Za-z0-9 | head -c12 > pass
|
|
|
|
keytool -genkeypair -dname "cn=opsi.org" -alias opsi.org -keypass $(cat pass) -keystore keystore -storepass $(cat pass) -validity 1000
|
|
|
|
jarsigner -keystore keystore -storepass $(cat pass) configed.jar opsi.org
|
|
|
|
jarsigner -keystore keystore -storepass $(cat pass) swingx.jar opsi.org
|
|
|
|
rm -rf pass
|
2011-11-12 19:21:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
java-pkg_jarinto /usr/lib/configed
|
|
|
|
insinto /usr/lib/configed
|
|
|
|
doins index.html javainfo.class
|
2013-04-17 08:48:39 +02:00
|
|
|
java-pkg_dojar "${S}"/configed.jar "${S}"/swingx.jar
|
2011-11-12 19:21:01 +01:00
|
|
|
java-pkg_dolauncher ${PN} --main de.uib.configed.configed
|
|
|
|
|
|
|
|
insinto /usr/share/configed
|
|
|
|
doins configed_icon.png
|
|
|
|
|
|
|
|
newicon configed_icon.png ${PN}.png
|
|
|
|
make_desktop_entry ${PN} "Opsi Configuration Editor" ${PN} Settings;Utility;
|
|
|
|
|
|
|
|
use source && java-pkg_dosrc "${S}"/src/*
|
|
|
|
}
|