1 | %define name jbigkit |
---|
2 | %define version 2.0 |
---|
3 | %define release 1%{?_dist_release} |
---|
4 | %define sover %(echo %version |cut -d. -f1) |
---|
5 | |
---|
6 | Name: %{name} |
---|
7 | Summary: The JBIG Kit |
---|
8 | Version: %{version} |
---|
9 | Release: %{release} |
---|
10 | License: GPL |
---|
11 | Source0: http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-%{version}.tar.gz |
---|
12 | URL: http://www.cl.cam.ac.uk/~mgk25 |
---|
13 | Group: Applications/Graphics |
---|
14 | BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
---|
15 | Requires: libjbig = %{version} |
---|
16 | |
---|
17 | |
---|
18 | %description |
---|
19 | JBIG is a highly effective lossless compression algorithm for bi-level |
---|
20 | images (one bit per pixel), which is particularly suitable for scanned |
---|
21 | document pages. |
---|
22 | |
---|
23 | %package -n libjbig |
---|
24 | Summary: Shared library for JBIG |
---|
25 | Group: System Environment/Libraries |
---|
26 | |
---|
27 | %description -n libjbig |
---|
28 | JBIG is a highly effective lossless compression algorithm for bi-level |
---|
29 | images (one bit per pixel), which is particularly suitable for scanned |
---|
30 | document pages. |
---|
31 | |
---|
32 | |
---|
33 | %package -n libjbig-devel |
---|
34 | Summary: Header files and static library for development with JBIG |
---|
35 | Group: Development/Libraries |
---|
36 | Requires: libjbig = %{version} |
---|
37 | |
---|
38 | %description -n libjbig-devel |
---|
39 | This package is only needed if you plan to develop or compile |
---|
40 | applications which requires the libjbig library. |
---|
41 | |
---|
42 | %prep |
---|
43 | %setup -q -n %{name} |
---|
44 | |
---|
45 | %build |
---|
46 | # First, build shared library. |
---|
47 | pushd libjbig |
---|
48 | %ifarch x86_64 ppc ppc64 |
---|
49 | make libjbig.a CFLAGS="$RPM_OPT_FLAGS -fPIC" |
---|
50 | %else |
---|
51 | make libjbig.a CFLAGS="$RPM_OPT_FLAGS" |
---|
52 | %endif |
---|
53 | gcc -shared -o libjbig.so.%version -Wl,-soname=libjbig.so.%sover `ar t libjbig.a` |
---|
54 | ln -sf libjbig.so.%version libjbig.so.%sover |
---|
55 | ln -sf libjbig.so.%version libjbig.so |
---|
56 | make clean |
---|
57 | popd |
---|
58 | |
---|
59 | # Second, build all the rest. |
---|
60 | make CCFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" |
---|
61 | #make test |
---|
62 | LD_LIBRARY_PATH=../libjbig make test |
---|
63 | #mv -f libjbig/jbig.doc libjbig/jbig.txt |
---|
64 | |
---|
65 | %install |
---|
66 | rm -rf $RPM_BUILD_ROOT |
---|
67 | mkdir -p $RPM_BUILD_ROOT%{_bindir} \ |
---|
68 | $RPM_BUILD_ROOT%{_includedir} \ |
---|
69 | $RPM_BUILD_ROOT%{_libdir} \ |
---|
70 | $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
71 | |
---|
72 | install -m 755 pbmtools/jbgtopbm $RPM_BUILD_ROOT%{_bindir} |
---|
73 | install -m 755 pbmtools/pbmtojbg $RPM_BUILD_ROOT%{_bindir} |
---|
74 | install -m 644 pbmtools/jbgtopbm.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
75 | install -m 644 pbmtools/pbmtojbg.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
76 | install -m 755 libjbig/libjbig.a $RPM_BUILD_ROOT%{_libdir} |
---|
77 | install -m 755 libjbig/libjbig.so.%{version} $RPM_BUILD_ROOT%{_libdir} |
---|
78 | install -m 644 libjbig/jbig.h $RPM_BUILD_ROOT%{_includedir} |
---|
79 | |
---|
80 | # symbolic link |
---|
81 | cd $RPM_BUILD_ROOT%{_libdir} |
---|
82 | ln -sf libjbig.so.%version libjbig.so.%sover |
---|
83 | ln -sf libjbig.so.%version libjbig.so |
---|
84 | |
---|
85 | %post -n libjbig -p /sbin/ldconfig |
---|
86 | |
---|
87 | %postun -n libjbig -p /sbin/ldconfig |
---|
88 | |
---|
89 | %clean |
---|
90 | rm -rf $RPM_BUILD_ROOT |
---|
91 | |
---|
92 | %files |
---|
93 | %defattr(-,root,root) |
---|
94 | %doc ANNOUNCE COPYING INSTALL TODO |
---|
95 | %attr(755,root,root) %{_bindir}/* |
---|
96 | %attr(644,root,root) %{_mandir}/man1/* |
---|
97 | |
---|
98 | %files -n libjbig |
---|
99 | %defattr(-,root,root) |
---|
100 | %{_libdir}/*.so.* |
---|
101 | |
---|
102 | %files -n libjbig-devel |
---|
103 | %defattr(-,root,root) |
---|
104 | %doc ANNOUNCE COPYING INSTALL TODO libjbig/jbig.txt |
---|
105 | %attr(644,root,root) %{_includedir}/*.h |
---|
106 | %{_libdir}/*.so |
---|
107 | %{_libdir}/*.a |
---|
108 | |
---|
109 | %changelog |
---|
110 | * Sat Oct 04 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0-1 |
---|
111 | - new upstream release |
---|
112 | |
---|
113 | * Sun Sep 28 2008 Shu KONNO <owa@bg.wakwak.com> 1.6-1vl5 |
---|
114 | - applied new versioning policy |
---|
115 | |
---|
116 | * Thu Dec 20 2007 Shu KONNO <owa@bg.wakwak.com> 1.6-0vl2 |
---|
117 | - added gcc option -fPIC in make |
---|
118 | |
---|
119 | * Sun Sep 26 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6-0vl1 |
---|
120 | - updated 1.6 |
---|
121 | - changed Group: |
---|
122 | - added Requires: libjbig to jbig, libjbig-devel packages |
---|
123 | |
---|
124 | * Thu May 13 2004 Satoshi MACHINO <machino@vinelinux.org> 1.5-0vl2 |
---|
125 | - fixed dynamic link of libjbig.so |
---|
126 | |
---|
127 | * Thu May 13 2004 Satoshi MACHINO <machino@vinelinux.org> 1.5-0vl1 |
---|
128 | - initial release |
---|
129 | |
---|