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