]> git.pld-linux.org Git - packages/gallery-remote.git/blame - gallery-remote.spec
- fixed desktop file; rel 1
[packages/gallery-remote.git] / gallery-remote.spec
CommitLineData
1621851f
RT
1#
2%define _base 1.5
a22d14da
ER
3%define _rc b32
4%define _rel 1
effac6e3 5Summary: Gallery Remote - client-side frontend to Gallery
1ae96b11 6Summary(pl.UTF-8): Gallery Remote - frontend do Gallery działający po stronie klienta
d2c4b7a9 7Name: gallery-remote
1621851f 8Version: 1.5.1
a22d14da 9Release: %{_rc}.%{_rel}
a264efdd 10License: GPL v2
d2c4b7a9 11Group: Applications/Publishing
3fcd82e1
ER
12Source0: http://dl.sourceforge.net/gallery/GalleryRemote.%{_base}.Linux.NoVM.bin
13# Source0-md5: 521fb28f0027c4d7c84f7ef26c21b790
a22d14da 14Source1: http://www.gallery2.hu/download/GalleryRemote/gallery_remote_%{version}-%{_rc}.zip
3fcd82e1 15# Source1-md5: 657d766c14a6e7e13b766b92dd67a13f
1621851f
RT
16Source2: %{name}.png
17Source3: %{name}.desktop
2c9f55d2 18URL: http://gallery.menalto.com/wiki/Gallery_Remote
a264efdd 19BuildRequires: sed >= 4.0
a264efdd 20Requires: ImageMagick
a264efdd 21Requires: ImageMagick-coder-jpeg
effac6e3 22Requires: ImageMagick-coder-jpeg2
a264efdd 23Requires: ImageMagick-coder-png
effac6e3
JB
24Requires: ImageMagick-coder-tiff
25Requires: jre >= 1.4
a264efdd
ER
26Requires: libjpeg-progs
27BuildArch: noarch
d2c4b7a9
ER
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%define _appdir %{_datadir}/%{name}
31
32%description
33Gallery Remote is a client-side Java application that provides users
34with a rich front-end to Gallery. This application makes it easier to
35upload images to your Gallery.
36
8c9ac1a6
JR
37%description -l pl.UTF-8
38Gallery Remote to aplikacja w Javie działająca po stronie klienta
43e8bd92
ER
39udostępniająca użytkownikom bogaty frontend do Gallery. Ta
40aplikacja czyni łatwiejszym umieszczanie obrazków w Gallery.
effac6e3 41
d2c4b7a9 42%prep
3fcd82e1 43%setup -qcT
a264efdd 44
3fcd82e1
ER
45# emulate the self-extractable installer
46head -n 256 %{SOURCE0} > header
47ARCHREALSIZE=$(awk -F= '/^ARCHREALSIZE=/{print $2}' header)
48BLOCKSIZE=$(awk -F= '/^BLOCKSIZE=/{print $2}' header)
49RESSIZE=$(awk -F= '/^RESSIZE=/{print $2}' header)
50ARCHSTART=$(awk -F= '/^ARCHSTART=/{print $2}' header)
51RESOURCE_ZIP=Resource1.zip
52INSTALLER_BLOCKS=$(expr $ARCHREALSIZE / $BLOCKSIZE)
53INSTALLER_REMAINDER=$(expr $ARCHREALSIZE % $BLOCKSIZE || :)
54if [ ${INSTALLER_REMAINDER:-0} -gt 0 ]; then
55 INSTALLER_BLOCKS=$(expr $INSTALLER_BLOCKS + 1)
56fi
57dd if=%{SOURCE0} of="$RESOURCE_ZIP" bs=$BLOCKSIZE skip=`expr $ARCHSTART + $INSTALLER_BLOCKS` count=$RESSIZE
58
59unzip -qq Resource1.zip
60mv '$IA_PROJECT_DIR$'/* .
61
62# should overwrite files from 1.5 according to http://gallery.menalto.com/wiki/Gallery_Remote
1621851f 63unzip -qq -o %{SOURCE1}
3fcd82e1 64
a264efdd
ER
65mv gallery_docs/dist/grpackage html
66rm -f LICENSE # GPL v2
67rm -rf */{win32,macos} # wrong os
68
69# make it configured
70mv imagemagick/im.properties{.preinstalled,}
71mv imagemagick/HOWTO HOWTO.imagemagick
a264efdd
ER
72
73# and jpegtran too
74mv jpegtran/{linux/,}jpegtran.properties
75rm jpegtran/linux/jpegtran # binary
76rm jpegtran/jpegtran.preinstalled
77rm -rf jpegtran/linux
78sed -i -e '/^jp\.path/s/=.*/=jpegtran/' jpegtran/jpegtran.properties
79# undos
153874ba 80sed -i -e 's,\r$,,' jpegtran/jpegtran.properties
d2c4b7a9
ER
81
82%install
83rm -rf $RPM_BUILD_ROOT
ddeb06c8 84install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
a264efdd 85cp -a imagemagick img jpegtran lib $RPM_BUILD_ROOT%{_appdir}
3fcd82e1 86cp -a GalleryRemote.jar $RPM_BUILD_ROOT%{_appdir}
a264efdd
ER
87cat <<EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
88#!/bin/sh
cdadf0af 89cd %{_appdir}
35190646 90exec java -Xmx1024m -cp GalleryRemote.jar com.gallery.GalleryRemote.GalleryRemote
a264efdd 91EOF
1621851f
RT
92install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
93install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
d2c4b7a9
ER
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
98%files
99%defattr(644,root,root,755)
3fcd82e1 100%doc ChangeLog html
a264efdd
ER
101%attr(755,root,root) %{_bindir}/*
102%{_appdir}
ddeb06c8
ER
103%{_desktopdir}/*.desktop
104%{_pixmapsdir}/*.png
This page took 0.071119 seconds and 4 git commands to generate.