]> git.pld-linux.org Git - packages/gallery-remote.git/blobdiff - gallery-remote.spec
- update to 1.5.1-b32
[packages/gallery-remote.git] / gallery-remote.spec
index e580664b9b517d844a611c8f8e1e6a910efcf344..9321e6dea2e2e0602456f9fda4ee47d99eb6e9cc 100644 (file)
@@ -1,17 +1,17 @@
 #
 %define                _base   1.5
-%define                _ver    b31
+%define                _ver    b32
 Summary:       Gallery Remote - client-side frontend to Gallery
 Summary(pl.UTF-8):     Gallery Remote - frontend do Gallery działający po stronie klienta
 Name:          gallery-remote
 Version:       1.5.1
-Release:       %{_ver}_0.1
+Release:       %{_ver}.0.2
 License:       GPL v2
 Group:         Applications/Publishing
-Source0:       http://dl.sourceforge.net/gallery/GalleryRemote.%{_base}.jar
-# Source0-md5: 6043106f54f85380b1bbc06d8dd19d4f
-Source1:       http://dl.sourceforge.net/gallery/GalleryRemote.1.5.Linux.NoVM.bin
-# Source1-md5: 521fb28f0027c4d7c84f7ef26c21b790
+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
@@ -39,13 +39,28 @@ udostępniająca użytkownikom bogaty frontend do Gallery. Ta
 aplikacja czyni łatwiejszym umieszczanie obrazków w Gallery.
 
 %prep
-%setup -q -c -n %{name}-%{_base}
-install -d gallery_docs
-unzip -qq -o Disk1/InstData/Resource1.zip
-mv '$IA_PROJECT_DIR$' %{name}
-cd %{name}
+%setup -qcT
 
+# 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
+
+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
 rm -rf */{win32,macos} # wrong os
@@ -53,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
@@ -66,11 +80,9 @@ 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 *.jar $RPM_BUILD_ROOT%{_appdir}
+cp -a GalleryRemote.jar $RPM_BUILD_ROOT%{_appdir}
 cat <<EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
 #!/bin/sh
 cd %{_appdir}
@@ -84,7 +96,7 @@ 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.066072 seconds and 4 git commands to generate.