source: spec/trunk/SPECS/bzip2.spec@ 18

Last change on this file since 18 was 17, checked in by Yuri Dario, 15 years ago

spec: fixed suffix extensions for patched files.

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1%define library_version 1.0.5
2
3Summary: A file compression utility
4Name: bzip2
5Version: 1.0.5
6Release: 1
7License: BSD
8Group: Applications/File
9URL: http://www.bzip.org/
10Source: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
11Patch0: bzip2-1.0.5-setmode.diff
12BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13
14%description
15Bzip2 is a freely available, patent-free, high quality data compressor.
16Bzip2 compresses files to within 10 to 15 percent of the capabilities
17of the best techniques available. However, bzip2 has the added benefit
18of being approximately two times faster at compression and six times
19faster at decompression than those techniques. Bzip2 is not the
20fastest compression utility, but it does strike a balance between speed
21and compression capability.
22
23Install bzip2 if you need a compression utility.
24
25%package devel
26Summary: Header files developing apps which will use bzip2
27Group: Development/Libraries
28Requires: bzip2-libs = %{version}-%{release}
29
30%description devel
31
32Header files and a library of bzip2 functions, for developing apps
33which will use the library.
34
35%package libs
36Summary: Libraries for applications using bzip2
37Group: System Environment/Libraries
38
39%description libs
40
41Libraries for applications using the bzip2 compression format.
42
43%prep
44# -D Do not delete the directory before unpacking.
45# -T Disable the automatic unpacking of the archives.
46%setup
47%patch0 -p1 -b .setmode~
48
49%build
50
51make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
52 CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \
53 %{?_smp_mflags} all
54
55%install
56rm -rf ${RPM_BUILD_ROOT}
57
58chmod 644 bzlib.h
59mkdir -p $RPM_BUILD_ROOT%{_bindir}
60mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
61#mkdir -p $RPM_BUILD_ROOT%{_lib}
62mkdir -p $RPM_BUILD_ROOT%{_libdir}
63mkdir -p $RPM_BUILD_ROOT%{_includedir}
64cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir}
65install -m 755 libbz2.a $RPM_BUILD_ROOT/%{_libdir}
66install -m 755 bzip2.exe $RPM_BUILD_ROOT%{_bindir}
67install -m 755 bzip2recover.exe bzgrep bzdiff bzmore $RPM_BUILD_ROOT%{_bindir}/
68cp -p bzip2.1 bzdiff.1 bzgrep.1 bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/
69cp bzip2.exe $RPM_BUILD_ROOT%{_bindir}/bunzip2.exe
70cp bzip2.exe $RPM_BUILD_ROOT%{_bindir}/bzcat.exe
71ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp
72ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless
73#ln -s libbz2.so.%{library_version} $RPM_BUILD_ROOT/%{_lib}/libbz2.so.1
74#ln -s ../../%{_lib}/libbz2.so.1 $RPM_BUILD_ROOT/%{_libdir}/libbz2.so
75ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzip2recover.1
76ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bunzip2.1
77ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1
78ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
79ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
80
81
82#%post libs -p /sbin/ldconfig
83
84#%postun libs -p /sbin/ldconfig
85
86%clean
87rm -rf ${RPM_BUILD_ROOT}
88
89%files
90%defattr(-,root,root,-)
91%doc LICENSE CHANGES README
92%{_bindir}/*
93%{_mandir}/*/*
94
95%files libs
96%defattr(-,root,root,-)
97%doc LICENSE
98#/%{_lib}/*so.*
99
100%files devel
101%defattr(-,root,root,-)
102%doc manual.html manual.pdf
103%{_includedir}/*
104/%{_libdir}/*.a
105
106%changelog
Note: See TracBrowser for help on using the repository browser.