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