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