]> git.pld-linux.org Git - packages/crnlib.git/blob - crnlib.spec
- updated URL
[packages/crnlib.git] / crnlib.spec
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 #
5 # NOTE: we use "crnlib" because plain "crunch" or "libcrunch" isn't unique project name
6 Summary:        crunch/crnlib - advanced DXTn texture compression library
7 Summary(pl.UTF-8):      crunch/crnlib - zaawansowana biblioteka do kompresji tekstur DXTn
8 Name:           crnlib
9 Version:        1.04
10 Release:        2
11 License:        ZLib
12 Group:          Libraries
13 #Source0Download: https://github.com/BinomialLLC/crunch/releases
14 # v104 came from old googlecode repo:
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
18 Source0:        crunch-104.tar.xz
19 # Source0-md5:  f92837bba95abf27d6bd9ae0b2b04863
20 Patch0:         %{name}-c++.patch
21 Patch1:         %{name}-types.patch
22 URL:            https://github.com/BinomialLLC/crunch
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libtool
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 crnlib is a lossy texture compression library for developers that ship
29 content using the DXT1/5/N or 3DC compressed color/normal map/cubemap
30 mipmapped texture formats.
31
32 %description -l pl.UTF-8
33 crnlib to biblioteka stratnej kompresji dla programistów
34 dostarczających dane przy użyciu formatów tekstur (kolorów, map
35 normalnych i innych) z zastosowaną kompresją DXT1/5/N lub 3DC.
36
37 %package devel
38 Summary:        Header files for crnlib library
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki crnlib
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42 Requires:       libstdc++-devel
43
44 %description devel
45 Header files for crnlib library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki crnlib.
49
50 %package static
51 Summary:        Static crnlib library
52 Summary(pl.UTF-8):      Statyczna biblioteka crnlib
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static crnlib library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka crnlib.
61
62 %prep
63 %setup -q -n crunch
64 %patch0 -p1
65 %patch1 -p1
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
77 libtool --mode=link %{__cxx} %{rpmldflags} -o crnlib/libcrunch.la crnlib/{crnlib,crn_*,lzma_*}.lo -rpath %{_libdir} -lpthread
78 # relink using shared library
79 libtool --mode=link %{__cxx} %{rpmldflags} -o crnlib/crunch crnlib/{crunch,corpus_gen,corpus_test}.o crnlib/libcrunch.la -lpthread
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
84
85 libtool --mode=install install crnlib/libcrunch.la $RPM_BUILD_ROOT%{_libdir}
86 cp -p inc/*.h $RPM_BUILD_ROOT%{_includedir}
87 install crnlib/crunch $RPM_BUILD_ROOT%{_bindir}
88
89 %clean
90 rm -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.133968 seconds and 3 git commands to generate.