]> git.pld-linux.org Git - packages/pngcrush.git/blame - pngcrush.spec
- updated to 1.8.13
[packages/pngcrush.git] / pngcrush.spec
CommitLineData
896bd253 1#
2# Conditional build:
8be9d706
JB
3%bcond_with systemlibs # use system libraries instead of modified ones
4# (modified can give little better results)
43fdff6e 5# NOTE:
9182092c 6# - to use system libs, read desc from homepage: http://pmt.sourceforge.net/pngcrush/
43fdff6e
ER
7# - bundled zlib-1.2.3 differs from zlib-1.2.3 that it defines TOO_FAR
8# 32767 instead of 4096
9# - libpng diffs (this is bad?):
10#diff -ur ../libpng-1.2.8/pngrutil.c ./pngrutil.c
11#--- ../libpng-1.2.8/pngrutil.c 2006-03-21 16:12:37.000000000 +0200
12#+++ ./pngrutil.c 2005-02-28 15:55:20.000000000 +0200
13#@@ -1056,12 +1056,6 @@
14# prefix_length = profile - chunkdata;
15# chunkdata = png_decompress_chunk(png_ptr, compression_type, chunkdata,
16# slength, prefix_length, &data_length);
17#- if(chunkdata)
18#- png_set_iCCP(png_ptr, info_ptr, chunkdata, compression_type,
19#- chunkdata + prefix_length, data_length);
20#- else
21#- png_set_iCCP(png_ptr, info_ptr, chunkdata, compression_type,
22#- 0x00, prefix_length);
896bd253 23#
43fdff6e 24# profile_length = data_length - prefix_length;
b27f6260 25#
40e0a680 26Summary: Optimizer for png files
b3fd32bf
ER
27Summary(pl.UTF-8): Optymalizator plików png
28Summary(pt_BR.UTF-8): Utilitário para compressão de pngs
40e0a680 29Name: pngcrush
ef461a71 30Version: 1.8.13
d833b022
KK
31Release: 1
32License: BSD-like (see LICENSE)
40e0a680 33Group: Applications/Graphics
9182092c 34Source0: http://downloads.sourceforge.net/pmt/%{name}-%{version}.tar.xz
ef461a71
JB
35# Source0-md5: 2eeb072fcb56dcc4f7ccc35bd4238bd3
36Patch0: %{name}-ptrdiff.patch
b27f6260 37URL: http://pmt.sourceforge.net/pngcrush/
9182092c
ER
38BuildRequires: tar >= 1:1.22
39BuildRequires: xz
8be9d706 40%if %{with systemlibs}
a39a771b 41BuildRequires: libpng-devel
ef461a71 42BuildRequires: pkgconfig
a39a771b 43BuildRequires: zlib-devel
896bd253 44%endif
40e0a680 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48This program reads in a PNG image, and writes it out again, with the
49optimum filter_method and zlib_level. It uses brute force (trying
50filter_method none, and libpng adaptive filtering, with compression
51levels 3 and 9). It does the most time-consuming method last in case
52it turns out to be the best.
53
212dd0f3 54%description -l pl.UTF-8
40e0a680 55Ten program wczytuje obrazek PNG i zapisuje go ponownie z optymalnymi
212dd0f3
JR
56parametrami filter_method i zlib_level. Używa metody brute force
57(próbuje filter_method none oraz adaptacyjnego filtrowania libpng ze
a39a771b 58stopniami kompresji 3 i 9).
40e0a680 59
212dd0f3
JR
60%description -l pt_BR.UTF-8
61O pngcrush é um otimizador para arquivos PNG (Portable Network
62Graphics). Ele pode comprimir os arquivos em até 40%, sem perdas.
9b9c0eb6 63
40e0a680 64%prep
65%setup -q
ef461a71 66%patch0 -p1
896bd253 67
43fdff6e
ER
68# create some real documentation
69# NOTE: remember to check these on upgrade!
70sed -ne '1,/*\//p' pngcrush.c | cut -b 4- > README
d833b022
KK
71sed -ne '/\/\* To do/,/*\/$/p;/PNG_INTERNAL/q' pngcrush.c | cut -b 4- > TODO
72sed -ne '/* COPYRIGHT/,/*\/$/p;' pngcrush.c | cut -b 4- > LICENSE
43fdff6e 73
40e0a680 74%build
ef461a71 75%{__make} %{?with_systemlibs:-f Makefile-nolib} \
a39a771b 76 CC="%{__cc}" \
ef461a71
JB
77 CFLAGS="%{rpmcflags} -std=c90 -Wall" \
78 OPTIONS="%{rpmcppflags}" \
79 LD="%{__cc}" \
80 LDFLAGS="%{rpmldflags}" \
8be9d706 81%if %{with systemlibs}
ef461a71
JB
82 PNGINC=$(pkg-config --variable=includedir libpng) \
83 PNGLIB=%{_libdir} \
84 ZINC=%{_includedir} \
85 ZLIB=%{_libdir}
896bd253 86%endif
40e0a680 87
40e0a680 88%install
89rm -rf $RPM_BUILD_ROOT
90install -d $RPM_BUILD_ROOT%{_bindir}
91
bde85515 92cp -p pngcrush $RPM_BUILD_ROOT%{_bindir}
40e0a680 93
40e0a680 94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%files
98%defattr(644,root,root,755)
f9f965fe 99%doc LICENSE README TODO ChangeLog.html
43fdff6e 100%attr(755,root,root) %{_bindir}/pngcrush
This page took 0.093537 seconds and 4 git commands to generate.