jbigkit-vl.spec 3.5 KB

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