]> git.pld-linux.org Git - packages/oxygen-editor.git/commitdiff
- old changes master
authorElan Ruusamäe <glen@delfi.ee>
Mon, 9 Jul 2012 18:43:57 +0000 (21:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 9 Jul 2012 18:43:57 +0000 (21:43 +0300)
oxygen-editor.spec

index 41e96d0c8405b7bfcab685236a43ece03684957f..3777958b08614dea49d52075cba8e058a36f4120 100644 (file)
@@ -1,9 +1,13 @@
 # TODO
 # - get evaluation key from http://www.oxygenxml.com/register.html
+#
+# Conditional build:
+%bcond_without inst    # build without using installer
+
 Summary:       <oXygen/> XML Editor
 Name:          oxygen-editor
 Version:       12.1
-Release:       0.1
+Release:       0.2
 License:       ?
 Group:         Development/Tools
 Source0:       http://www.oxygenxml.com/InstData/Editor/Linux/VM/oxygen32.sh
@@ -13,12 +17,17 @@ Source1:    http://www.oxygenxml.com/InstData/Editor/Linux64/VM/oxygen64.sh
 # NoSource1-md5:       012ee56a167af4a8979f3e8fb7078360
 NoSource:      1
 URL:           http://www.oxygenxml.com/download_oxygenxml_editor.html
-BuildRequires: unzip
+BuildRequires: jdk >= 1.6
+BuildRequires: symlinks
 Requires:      jdk >= 1.6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _appdir         %{_libdir}/%{name}
 
+# avoid strip abortion:
+# /usr/bin/strip: Unable to recognise the format of the input file `/usr/lib64/oxygen-editor/lib/com/sun/jna/linux-ia64/libjnidispatch.so'
+%define                _noautostrip    .*/libjnidispatch.so
+
 %description
 <oXygen/> XML Editor is a complete XML development platform providing
 the necessary tools for working with a wide range of XML standards and
@@ -31,32 +40,51 @@ technologies:
 - Native XML and relational database support
 
 %prep
-%setup -qc
+%setup -qcT
 %ifarch %{ix86}
 SOURCE=%{SOURCE0}
 %endif
 %ifarch %{x8664}
 SOURCE=%{SOURCE1}
 %endif
+%if %{without inst}
 offset=$(grep -a 'tail -c' $SOURCE | awk '{print $3}')
 tail -c $offset $SOURCE > sfx_archive.tar.gz
 tar zxf sfx_archive.tar.gz
+grep -aoE totalDataLength=[0-9]+ $SRC | cut -d= -f2 > totalDataLength.txt
+%endif
 ln -s $SOURCE src.sh
 
 %install
 rm -rf $RPM_BUILD_ROOT
-# make the license not span screen
-head -n6 i4j_extf_15_1im7gi7.txt > lic.txt
-sed -i -e 's,i4j_extf_15_1im7gi7.txt,lic.txt,' i4jparams.conf
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
 
 # nuke previous install info, confuses our answers sequence
 export HOME=$(pwd)
 rm -f $HOME/.java/.userPrefs/com/install4j/installations/prefs.xml
 
+export INSTALL4J_TEMP=$(pwd)
+export INSTALL4J_KEEP_TEMP=yes
+
 # command sequence to installer
 cat > cmd.txt <<EOF
 2
 o
+%if %{with inst}
+
+
+
+
+
+
+
+
+
+
+
+
+
+%endif
 1
 $RPM_BUILD_ROOT%{_appdir}
 1,2,3
@@ -66,10 +94,20 @@ y
 y
 EOF
 
+%if %{with inst}
+sh -x src.sh -c < cmd.txt
+%endif
+
+%if %{without inst}
+# make the license shorter not span screen to make install automation to work,
+# we package complete copy separetely anyway.
+head -n6 i4j_extf_15_1im7gi7.txt > lic.txt
+sed -i -e 's,i4j_extf_15_1im7gi7.txt,lic.txt,' i4jparams.conf
+
 %java \
        -Dinstall4j.jvmDir="%java_home" \
        -Dexe4j.moduleName="$(pwd)/src.sh" \
-       -Dexe4j.totalDataLength=97160734 \
+       -Dexe4j.totalDataLength=$(cat totalDataLength) \
        -Dinstall4j.cwd="$(pwd)" \
        -Xmx128m \
        -Dsun.java2d.noddraw=true \
@@ -78,11 +116,16 @@ EOF
        -classpath i4jruntime.jar:user.jar:user/i4jCustom.jar \
        com.install4j.runtime.launcher.Launcher launch \
        com.install4j.runtime.installer.Installer false false "" "" false true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500 "version 12.1" 20 40 "Arial" "0,0,0" 8 500 -1 -c < cmd.txt
+%endif
+
+symlinks -c $RPM_BUILD_ROOT%{_bindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{name}
-%dir %{_appdir}
+%attr(755,root,root) %{_bindir}/*
+# TODO: implicit attrs
+%defattr(-,root,root,-)
+%{_appdir}
This page took 0.095633 seconds and 4 git commands to generate.