5 Summary: Gallery Remote - client-side frontend to Gallery
6 Summary(pl.UTF-8): Gallery Remote - frontend do Gallery działający po stronie klienta
9 Release: %{_rc}.%{_rel}
11 Group: Applications/Publishing
12 Source0: http://dl.sourceforge.net/gallery/GalleryRemote.%{_base}.Linux.NoVM.bin
13 # Source0-md5: 521fb28f0027c4d7c84f7ef26c21b790
14 Source1: http://www.gallery2.hu/download/GalleryRemote/gallery_remote_%{version}-%{_rc}.zip
15 # Source1-md5: 657d766c14a6e7e13b766b92dd67a13f
17 Source3: %{name}.desktop
18 URL: http://gallery.menalto.com/wiki/Gallery_Remote
19 BuildRequires: sed >= 4.0
21 Requires: ImageMagick-coder-jpeg
22 Requires: ImageMagick-coder-jpeg2
23 Requires: ImageMagick-coder-png
24 Requires: ImageMagick-coder-tiff
26 Requires: libjpeg-progs
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _appdir %{_datadir}/%{name}
33 Gallery Remote is a client-side Java application that provides users
34 with a rich front-end to Gallery. This application makes it easier to
35 upload images to your Gallery.
37 %description -l pl.UTF-8
38 Gallery Remote to aplikacja w Javie działająca po stronie klienta
39 udostępniająca użytkownikom bogaty frontend do Gallery. Ta
40 aplikacja czyni łatwiejszym umieszczanie obrazków w Gallery.
45 # emulate the self-extractable installer
46 head -n 256 %{SOURCE0} > header
47 ARCHREALSIZE=$(awk -F= '/^ARCHREALSIZE=/{print $2}' header)
48 BLOCKSIZE=$(awk -F= '/^BLOCKSIZE=/{print $2}' header)
49 RESSIZE=$(awk -F= '/^RESSIZE=/{print $2}' header)
50 ARCHSTART=$(awk -F= '/^ARCHSTART=/{print $2}' header)
51 RESOURCE_ZIP=Resource1.zip
52 INSTALLER_BLOCKS=$(expr $ARCHREALSIZE / $BLOCKSIZE)
53 INSTALLER_REMAINDER=$(expr $ARCHREALSIZE % $BLOCKSIZE || :)
54 if [ ${INSTALLER_REMAINDER:-0} -gt 0 ]; then
55 INSTALLER_BLOCKS=$(expr $INSTALLER_BLOCKS + 1)
57 dd if=%{SOURCE0} of="$RESOURCE_ZIP" bs=$BLOCKSIZE skip=`expr $ARCHSTART + $INSTALLER_BLOCKS` count=$RESSIZE
59 unzip -qq Resource1.zip
60 mv '$IA_PROJECT_DIR$'/* .
62 # should overwrite files from 1.5 according to http://gallery.menalto.com/wiki/Gallery_Remote
63 unzip -qq -o %{SOURCE1}
65 mv gallery_docs/dist/grpackage html
66 rm -f LICENSE # GPL v2
67 rm -rf */{win32,macos} # wrong os
70 mv imagemagick/im.properties{.preinstalled,}
71 mv imagemagick/HOWTO HOWTO.imagemagick
74 mv jpegtran/{linux/,}jpegtran.properties
75 rm jpegtran/linux/jpegtran # binary
76 rm jpegtran/jpegtran.preinstalled
78 sed -i -e '/^jp\.path/s/=.*/=jpegtran/' jpegtran/jpegtran.properties
80 sed -i -e 's,\r$,,' jpegtran/jpegtran.properties
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
85 cp -a imagemagick img jpegtran lib $RPM_BUILD_ROOT%{_appdir}
86 cp -a GalleryRemote.jar $RPM_BUILD_ROOT%{_appdir}
87 cat <<EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
90 exec java -Xmx1024m -cp GalleryRemote.jar com.gallery.GalleryRemote.GalleryRemote
92 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
93 install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
96 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
101 %attr(755,root,root) %{_bindir}/*
103 %{_desktopdir}/*.desktop