]> git.pld-linux.org Git - packages/crnlib.git/blob - crnlib.spec
269f600888cc96d2d64d560d1c04ffd3b0dc8a39
[packages/crnlib.git] / crnlib.spec
1 # NOTE: we use "crnlib" because plain "crunch" or "libcrunch" isn't unique project name
2 Summary:        crunch/crnlib - advanced DXTn texture compression library
3 Summary(pl.UTF-8):      crunch/crnlib - zaawansowana biblioteka do kompresji tekstur DXTn
4 Name:           crnlib
5 Version:        1.04
6 Release:        1
7 License:        ZLib
8 Group:          Libraries
9 #Source0Download: http://code.google.com/p/crunch/downloads/list
10 # but no Linux-supporting releases there
11 # svn co http://crunch.googlecode.com/svn/tags/v104 crunch
12 # rm -rf crunch/bin*
13 # tar cJf crunch-104.tar.xz -x .svn crunch
14 Source0:        crunch-104.tar.xz
15 # Source0-md5:  f92837bba95abf27d6bd9ae0b2b04863
16 Patch0:         %{name}-c++.patch
17 URL:            http://code.google.com/p/crunch/
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  libtool
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 crnlib is a lossy texture compression library for developers that ship
24 content using the DXT1/5/N or 3DC compressed color/normal map/cubemap
25 mipmapped texture formats.
26
27 %description -l pl.UTF-8
28 crnlib to biblioteka stratnej kompresji dla programistów
29 dostarczających dane przy użyciu formatów tekstur (kolorów, map
30 normalnych i innych) z zastosowaną kompresją DXT1/5/N lub 3DC.
31
32 %package devel
33 Summary:        Header files for crnlib library
34 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki crnlib
35 Group:          Development/Libraries
36 Requires:       %{name} = %{version}-%{release}
37 Requires:       libstdc++-devel
38
39 %description devel
40 Header files for crnlib library.
41
42 %description devel -l pl.UTF-8
43 Pliki nagłówkowe biblioteki crnlib.
44
45 %package static
46 Summary:        Static crnlib library
47 Summary(pl.UTF-8):      Statyczna biblioteka crnlib
48 Group:          Development/Libraries
49 Requires:       %{name}-devel = %{version}-%{release}
50
51 %description static
52 Static crnlib library.
53
54 %description static -l pl.UTF-8
55 Statyczna biblioteka crnlib.
56
57 %prep
58 %setup -q -n crunch
59 %patch0 -p1
60
61 %{__sed} -i -e '/g++.*COMPILE_OPTIONS/s/g++/$(CXX)/' crnlib/Makefile
62 %{__sed} -i -e '/g++.*LINKER_OPTIONS/s/g++/$(CXXLINK)/' crnlib/Makefile
63
64 %build
65 %{__make} -C crnlib \
66         CXX="libtool --mode=compile %{__cxx}" \
67         CXXLINK="libtool --mode=link %{__cxx}" \
68         COMPILE_OPTIONS="%{rpmcflags} -fomit-frame-pointer -ffast-math -fno-math-errno -fno-strict-aliasing -Wall -Wno-unused-value -Wno-unused" \
69         LINKER_OPTIONS="%{rpmldflags} -lpthread"
70
71 libtool --mode=link %{__cxx} %{rpmldflags} -o crnlib/libcrunch.la crnlib/{crnlib,crn_*,lzma_*}.lo -rpath %{_libdir} -lpthread
72 # relink using shared library
73 libtool --mode=link %{__cxx} %{rpmldflags} -o crnlib/crunch crnlib/{crunch,corpus_gen,corpus_test}.o crnlib/libcrunch.la -lpthread
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
78
79 libtool --mode=install install crnlib/libcrunch.la $RPM_BUILD_ROOT%{_libdir}
80 cp -p inc/*.h $RPM_BUILD_ROOT%{_includedir}
81 install crnlib/crunch $RPM_BUILD_ROOT%{_bindir}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post   -p /sbin/ldconfig
87 %postun -p /sbin/ldconfig
88
89 %files
90 %defattr(644,root,root,755)
91 %doc license.txt readme.txt
92 %attr(755,root,root) %{_bindir}/crunch
93 %attr(755,root,root) %{_libdir}/libcrunch.so.*.*.*
94 %attr(755,root,root) %ghost %{_libdir}/libcrunch.so.0
95
96 %files devel
97 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_libdir}/libcrunch.so
99 %{_libdir}/libcrunch.la
100 %{_includedir}/crn_decomp.h
101 %{_includedir}/crnlib.h
102 %{_includedir}/dds_defs.h
103
104 %files static
105 %defattr(644,root,root,755)
106 %{_libdir}/libcrunch.a
This page took 0.030323 seconds and 2 git commands to generate.