]> git.pld-linux.org Git - packages/gallery-remote.git/blob - gallery-remote.spec
- fixed desktop file; rel 1
[packages/gallery-remote.git] / gallery-remote.spec
1 #
2 %define         _base   1.5
3 %define         _rc             b32
4 %define         _rel    1
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
7 Name:           gallery-remote
8 Version:        1.5.1
9 Release:        %{_rc}.%{_rel}
10 License:        GPL v2
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
16 Source2:        %{name}.png
17 Source3:        %{name}.desktop
18 URL:            http://gallery.menalto.com/wiki/Gallery_Remote
19 BuildRequires:  sed >= 4.0
20 Requires:       ImageMagick
21 Requires:       ImageMagick-coder-jpeg
22 Requires:       ImageMagick-coder-jpeg2
23 Requires:       ImageMagick-coder-png
24 Requires:       ImageMagick-coder-tiff
25 Requires:       jre >= 1.4
26 Requires:       libjpeg-progs
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _appdir %{_datadir}/%{name}
31
32 %description
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.
36
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.
41
42 %prep
43 %setup -qcT
44
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)
56 fi
57 dd if=%{SOURCE0} of="$RESOURCE_ZIP" bs=$BLOCKSIZE skip=`expr $ARCHSTART + $INSTALLER_BLOCKS` count=$RESSIZE
58
59 unzip -qq Resource1.zip
60 mv '$IA_PROJECT_DIR$'/* .
61
62 # should overwrite files from 1.5 according to http://gallery.menalto.com/wiki/Gallery_Remote
63 unzip -qq -o %{SOURCE1}
64
65 mv gallery_docs/dist/grpackage html
66 rm -f LICENSE # GPL v2
67 rm -rf */{win32,macos} # wrong os
68
69 # make it configured
70 mv imagemagick/im.properties{.preinstalled,}
71 mv imagemagick/HOWTO HOWTO.imagemagick
72
73 # and jpegtran too
74 mv jpegtran/{linux/,}jpegtran.properties
75 rm jpegtran/linux/jpegtran # binary
76 rm jpegtran/jpegtran.preinstalled
77 rm -rf jpegtran/linux
78 sed -i -e '/^jp\.path/s/=.*/=jpegtran/' jpegtran/jpegtran.properties
79 # undos
80 sed -i -e 's,\r$,,' jpegtran/jpegtran.properties
81
82 %install
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}
88 #!/bin/sh
89 cd %{_appdir}
90 exec java -Xmx1024m -cp GalleryRemote.jar com.gallery.GalleryRemote.GalleryRemote
91 EOF
92 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
93 install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc ChangeLog html
101 %attr(755,root,root) %{_bindir}/*
102 %{_appdir}
103 %{_desktopdir}/*.desktop
104 %{_pixmapsdir}/*.png
This page took 0.154336 seconds and 3 git commands to generate.