]> git.pld-linux.org Git - packages/gallery-remote.git/blobdiff - gallery-remote.spec
- typo
[packages/gallery-remote.git] / gallery-remote.spec
index 9555ee28b572d31af9c337e9146731c9cd2f5cf0..9321e6dea2e2e0602456f9fda4ee47d99eb6e9cc 100644 (file)
@@ -1,14 +1,20 @@
+#
+%define                _base   1.5
+%define                _ver    b32
 Summary:       Gallery Remote - client-side frontend to Gallery
-Summary(pl):   Gallery Remote - frontend do Gallery dzia³aj±cy po stronie klienta
+Summary(pl.UTF-8):     Gallery Remote - frontend do Gallery działający po stronie klienta
 Name:          gallery-remote
-Version:       1.4.1
-Release:       0.16
+Version:       1.5.1
+Release:       %{_ver}.0.2
 License:       GPL v2
 Group:         Applications/Publishing
-Source0:       http://dl.sourceforge.net/gallery/GalleryRemote.%{version}.jar
-# Source0-md5: 763af4f97120f5142222961f02e3943d
-Source1:       %{name}.png
-URL:           http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Gallery%20Remote
+Source0:       http://dl.sourceforge.net/gallery/GalleryRemote.%{_base}.Linux.NoVM.bin
+# Source0-md5: 521fb28f0027c4d7c84f7ef26c21b790
+Source1:       http://www.gallery2.hu/download/GalleryRemote/gallery_remote_%{version}-%{_ver}.zip
+# Source1-md5: 657d766c14a6e7e13b766b92dd67a13f
+Source2:       %{name}.png
+Source3:       %{name}.desktop
+URL:           http://gallery.menalto.com/wiki/Gallery_Remote
 BuildRequires: sed >= 4.0
 Requires:      ImageMagick
 Requires:      ImageMagick-coder-jpeg
@@ -27,19 +33,33 @@ Gallery Remote is a client-side Java application that provides users
 with a rich front-end to Gallery. This application makes it easier to
 upload images to your Gallery.
 
-%description -l pl
-Gallery Remote to aplikacja w Javie dzia³aj±ca po stronie klienta
-udostêpniaj±ca u¿ytkownikom bogaty frontend do Gallery. Ta aplikacja
-czyni ³atwiejszym umieszczanie obrazków w Gallery.
+%description -l pl.UTF-8
+Gallery Remote to aplikacja w Javie działająca po stronie klienta
+udostępniająca użytkownikom bogaty frontend do Gallery. Ta
+aplikacja czyni łatwiejszym umieszczanie obrazków w Gallery.
 
 %prep
-%setup -q -c
-unzip -qq Disk1/InstData/Resource1.zip
+%setup -qcT
 
-# use better names
-mv '$IA_PROJECT_DIR$' %{name}
+# emulate the self-extractable installer
+head -n 256 %{SOURCE0} > header
+ARCHREALSIZE=$(awk -F= '/^ARCHREALSIZE=/{print $2}' header)
+BLOCKSIZE=$(awk -F= '/^BLOCKSIZE=/{print $2}' header)
+RESSIZE=$(awk -F= '/^RESSIZE=/{print $2}' header)
+ARCHSTART=$(awk -F= '/^ARCHSTART=/{print $2}' header)
+RESOURCE_ZIP=Resource1.zip
+INSTALLER_BLOCKS=$(expr $ARCHREALSIZE / $BLOCKSIZE)
+INSTALLER_REMAINDER=$(expr $ARCHREALSIZE % $BLOCKSIZE || :)
+if [ ${INSTALLER_REMAINDER:-0} -gt 0 ]; then
+       INSTALLER_BLOCKS=$(expr $INSTALLER_BLOCKS + 1)
+fi
+dd if=%{SOURCE0} of="$RESOURCE_ZIP" bs=$BLOCKSIZE skip=`expr $ARCHSTART + $INSTALLER_BLOCKS` count=$RESSIZE
 
-cd %{name}
+unzip -qq Resource1.zip
+mv '$IA_PROJECT_DIR$'/* .
+
+# should overwrite files from 1.5 according to http://gallery.menalto.com/wiki/Gallery_Remote
+unzip -qq -o %{SOURCE1}
 
 mv gallery_docs/dist/grpackage html
 rm -f LICENSE # GPL v2
@@ -48,7 +68,6 @@ rm -rf */{win32,macos} # wrong os
 # make it configured
 mv imagemagick/im.properties{.preinstalled,}
 mv imagemagick/HOWTO HOWTO.imagemagick
-rm imagemagick/LICENSE # imagemagick license
 
 # and jpegtran too
 mv jpegtran/{linux/,}jpegtran.properties
@@ -57,42 +76,27 @@ rm jpegtran/jpegtran.preinstalled
 rm -rf jpegtran/linux
 sed -i -e '/^jp\.path/s/=.*/=jpegtran/' jpegtran/jpegtran.properties
 # undos
-sed -i -e 's,
-$,,' jpegtran/jpegtran.properties
+sed -i -e 's,\r$,,' jpegtran/jpegtran.properties
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd %{name}
-
 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
 cp -a imagemagick img jpegtran lib $RPM_BUILD_ROOT%{_appdir}
-cp -a defaults.properties rar*.* $RPM_BUILD_ROOT%{_appdir}
-cp -a *.jar $RPM_BUILD_ROOT%{_appdir}
+cp -a GalleryRemote.jar $RPM_BUILD_ROOT%{_appdir}
 cat <<EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
 #!/bin/sh
 cd %{_appdir}
-exec java -cp GalleryRemote.jar com.gallery.GalleryRemote.GalleryRemote
-EOF
-install %{SOURCE1} $RPM_BUILD_ROOT%{_pixmapsdir}
-cat <<EOF > $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-[Desktop Entry]
-Encoding=UTF-8
-Name=Gallery Remote
-Comment=Gallery Remote - client-side frontend to Gallery
-Icon=%{name}.png
-Exec=%{name}
-Terminal=false
-Type=Application
-Categories=Graphics;
-# vi: encoding=utf-8
+exec java -Xmx1024m -cp GalleryRemote.jar com.gallery.GalleryRemote.GalleryRemote
 EOF
+install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc %{name}/{ChangeLog,README,HOWTO.imagemagick,html}
+%doc ChangeLog html
 %attr(755,root,root) %{_bindir}/*
 %{_appdir}
 %{_desktopdir}/*.desktop
This page took 0.101485 seconds and 4 git commands to generate.