]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - bzip2/bzip2.nm
bzip2: Make package work on x86_64.
[people/stevee/ipfire-3.x.git] / bzip2 / bzip2.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = bzip2
7 version = 1.0.6
8 release = 4
9
10 groups = Applications/Compression
11 url = http://www.bzip.org/
12 license = GPLv2+
13 summary = Bzip2 is a data compressor.
14
15 description
16 bzip2 is a freely available, patent free (see below), high-quality data
17 compressor that is an alternative to the GNU zip compressor.
18 end
19
20 source_dl = http://www.bzip.org/%{version}/
21
22 CFLAGS += -fPIC -D_FILE_OFFSET_BITS=64
23
24 build
25 prepare_cmds
26 sed -i 's@\(ln -s -f \)\$(PREFIX)/bin/@\1@' Makefile
27 sed -e "s/\$(CC) -shared/& %{CFLAGS}/" -i Makefile-libbz2_so
28 end
29
30 build
31 %{DO_FIX_LIBTOOL}
32 make -f Makefile-libbz2_so %{PARALLELISMFLAGS} CFLAGS="%{CFLAGS}"
33
34 make clean
35 make %{PARALLELISMFLAGS} CFLAGS="%{CFLAGS}"
36 end
37
38 install
39 # Install binaries.
40 mkdir -pv %{BUILDROOT}/bin
41 cp -v bzip2-shared %{BUILDROOT}/bin/bzip2
42 ln -svf bzip2 %{BUILDROOT}%{bindir}/bunzip2
43 ln -svf bzip2 %{BUILDROOT}%{bindir}/bzcat
44 ln -svf bzip2 %{BUILDROOT}%{bindir}/bzcmp
45 ln -svf bzip2 %{BUILDROOT}%{bindir}/bless
46
47 # Install libs.
48 mkdir -pv %{BUILDROOT}%{libdir} %{BUILDROOT}/%{lib}
49 install -m 755 libbz2.so.%{version} %{BUILDROOT}/%{lib}
50 ln -svf libbz2.so.%{version} %{BUILDROOT}/lib/libbz2.so.1
51 ln -svf ../../lib/libbz2.so.1.0 %{BUILDROOT}%{libdir}/libbz2.so
52
53 # Install headers.
54 mkdir -pv %{BUILDROOT}%{includedir}
55 install -m 644 bzlib.h %{BUILDROOT}%{includedir}
56
57 # Install man pages.
58 mkdir -pv %{BUIDLROOT}%{mandir}/man1
59 cp -vp bzip2.1 bzdiff.1 bzgrep.1 bzmore.1 %{BUILDROOT}%{mandir}/man1
60 ln -svf bzip2.1 %{BUILDROOT}%{mandir}/man1/bzip2recover.1
61 ln -svf bzip2.1 %{BUILDROOT}%{mandir}/man1/bunzip2.1
62 ln -svf bzip2.1 %{BUILDROOT}%{mandir}/man1/bzcat.1
63 ln -svf bzdiff.1 %{BUILDROOT}%{mandir}/man1/bzcmp.1
64 ln -svf bzmore2.1 %{BUILDROOT}%{mandir}/man1/bzless.1
65 end
66 end
67
68 packages
69 package %{name}
70 groups += Build
71 end
72
73 package %{name}-devel
74 template DEVEL
75 end
76
77 package %{name}-debuginfo
78 template DEBUGINFO
79 end
80 end