dev-perl/SMTP-Server - minor typo in ebuild
[anomen-overlay.git] / app-office / winstrom / winstrom-10.6.3.ebuild
blob06803fd564d5835f10ef0770474b8ad4a59c8450
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit eutils font java-pkg-2
7 DESCRIPTION="Czech Economic System."
8 SRC_URI="http://www.winstrom.cz/download/${PV%.*}/${P}.tar.gz"
9 HOMEPAGE="http://www.winstrom.cz/"
10 LICENSE="WinStorm"
11 SLOT="0"
12 KEYWORDS="x86 ~amd64"
13 IUSE="logrotate server"
14 RESTRICT="nomirror"
16 DEPEND=""
17 RDEPEND="|| (
18 >=dev-java/sun-jre-bin-1.6
19 >=dev-java/sun-jdk-1.6
21 server? ( >=virtual/postgresql-server-8.3 )
22 logrotate? ( app-admin/logrotate )"
23 # not all packages available so use the included
24 # >=dev-java/jdbc-postgresql-8.3_p603
25 # >=dev-java/antlr-2.7.6
26 # >=dev-java/apple-java-extensions-bin-1.2
27 # =dev-java/asm-1.5.3
28 # >=dev-java/bcprov-1.36
29 # >=dev-java/jgoodies-binding-1.1.1
30 # =dev-java/cglib-2.1.3
31 # >=dev-java/commons-beanutils-1.7.0
32 # >=dev-java/commons-codec-1.3
33 # dev-java/commons-collections
34 # >=dev-java/commons-digester-1.7
35 # >=dev-java/commons-httpclient-3.1
36 # >=dev-java/commons-logging-1.0.4
37 # >=dev-java/dom4j-1.6.1
38 # >=dev-java/ehcache-1.2.3
39 # >=dev-java/hibernate-3.2.3
40 # >=dev-java/hibernate-annotations-3.2.1
41 # >=dev-java/itext-1.3.1
42 # >=app-text/jasperreports-1.3.3
43 # >=dev-java/javahelp-2.0.02
44 # >=dev-java/jcommon-1.0.2
45 # >=dev-java/jta-1.0.1
46 # >=dev-java/junit-3.8.1
47 # >=dev-java/log4j-1.2.12
48 # >=dev-java/sun-javamail-1.4
49 # >=dev-java/glassfish-persistence-1.0
50 # >=dev-java/poi-3.1
51 # >=dev-java/swing-layout-1.0.2
52 # >=dev-java/swingx-0.9.3
53 # >=dev-java/xstream-1.2.2
54 # >=dev-java/c3p0-0.9.1
55 # >=dev-util/eclipse-sdk-3.1.0" # jdtcore
57 S="${WORKDIR}/${P}"
58 LANGS="cs en sk"
60 pkg_setup() {
61 # user under which the winstrom server is running
62 enewuser winstrom 120 -1 /tmp nobody
65 src_unpack() {
66 # convert deb to tar.gz and unpack it
67 unpack ${A}
69 # change the postgres port
70 sed -i 's/5435/5432/' ${S}/etc/winstrom/winstrom-server.xml || die
72 # move winstrom jars into the temp dir, delete the rest and move it back
73 # cd ${S}/usr/share/${PN}/lib
74 # mkdir tmp
75 # mv ./winstrom-* ./softeu-* ./tmp
76 # rm -f *.jar
77 # mv ./tmp/*.jar ./
79 # link all system libraries
80 # java-pkg_jar-from eclipse-ecj-3.1
81 # ...
84 src_compile() {
88 src_install() {
89 cd "${S}"
90 if use server; then
91 # configuration
92 insinto /etc/${PN}
93 #doins etc/${PN}/ws.cenServer.xml
94 doins etc/${PN}/winstrom-server.xml
95 fowners winstrom:root /etc/${PN}/winstrom-server.xml
96 fperms 600 /etc/${PN}/winstrom-server.xml
98 # config script
99 newconfd ${FILESDIR}/${PN}-server.conf ${PN}-server
101 # init script
102 newinitd ${FILESDIR}/${PN}-server.init ${PN}-server
105 # logrotate script
106 if use logrotate ; then
107 insinto /etc/logrotate.d
108 doins etc/logrotate.d/${PN}
111 # splash screen
112 insinto /usr/share/${PN}
113 doins usr/share/${PN}/${PN}-logo-small.png
114 doins usr/share/${PN}/${PN}-splash.png
116 # libraries
117 java-pkg_dojar usr/share/${PN}/lib/*.jar
119 # launcher, server, client and VERSION
120 insinto /usr/share/${PN}/lib
121 doins usr/share/${PN}/lib/*.txt
123 # fonts
124 FONT_SUFFIX="ttf"
125 FONT_S=${S}/usr/share/fonts/truetype
126 FONT_PN=${PN}
127 font_src_install
129 # icon
130 doicon usr/share/pixmaps/${PN}.png
132 # doc
133 dodoc usr/share/doc/${PN}/*
135 # create wrapper script for the server
136 java-pkg_dolauncher ${PN}-server --main cz.winstrom.net.server.WinStromServer --pkg_args "-c /etc/winstrom/winstrom-server.xml --daemon" --java_args "-Xmx20m -client -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=10 -Djava.awt.headless=true -XX:CompileThreshold=16384"
137 dodir /usr/sbin
138 mv ${D}/usr/bin/${PN}-server ${D}/usr/sbin || die
140 # install mime types
141 insinto /usr/share/mimelnk/application/
142 doins usr/share/mimelnk/application/*
143 insinto /usr/share/mime/packages/
144 doins usr/share/mime/packages/*
146 # default file
147 dodir /etc/default
148 head -n6 etc/default/${PN} | tail -n2 > ${D}/etc/default/${PN}
150 # create wrapper script for the client
151 java-pkg_dolauncher ${PN} --main org.codehaus.classworlds.Launcher --java_args "-splash:/usr/share/${PN}/${PN}.png -Xmx256m -client -Dwinstromdir=/usr/share/${PN}/lib -Dclassworlds.conf=/usr/share/${PN}/lib/launcher.txt"
153 # desktop entry
154 make_desktop_entry ${PN} "WinStrom" ${PN}.png "Office"
158 pkg_postinst() {
159 elog
160 if use server ;then
161 elog "To make WinStrom working, you have to start up the PostgreSQL server first."
162 elog "Then, you have to create WinStrom DB admin (with password '7971'):"
163 elog "$ createuser -a -d -P -E -U postgres -W dba"
164 elog
165 elog "First you have to start up the WinStrom server by /etc/init.d/winstrom-server."
166 elog "Then you can start up the application by /usr/bin/winstrom."
167 elog
169 elog "Fist time you start the WinStrom application, go into the Data source management"
170 elog "and Add new Data source with Server address 127.0.0.1 and Server port 5434."
171 elog