ocaml-camlpdf-vl.spec 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. %define pkg_name camlpdf
  2. %define pkg_version 2.2
  3. %define patchlevel 1
  4. %define pkg_release 1%{?_dist_release}
  5. Summary: OCaml library for reading, writing and modifying PDF files
  6. Name: ocaml-%{pkg_name}
  7. Version: %{pkg_version}.p%{patchlevel}
  8. Release: %{pkg_release}
  9. License: LGPL v2.1+
  10. Group: Development/Languages
  11. URL: https://github.com/johnwhitington/camlpdf
  12. Source0: camlpdf-%{pkg_version}-patchlevel%{patchlevel}.tar.gz
  13. # Source0: camlpdf-%{pkg_version}.tar.gz
  14. BuildRequires: ocaml
  15. BuildRequires: ocaml-findlib
  16. Requires: ocaml
  17. Vendor: Project Vine
  18. Distribution: Vine Linux
  19. %description
  20. OCaml library for reading, writing and modifying PDF files
  21. %prep
  22. %{__rm} -rf ${RPM_BUILD_ROOT}
  23. %setup -q -n %{pkg_name}-%{pkg_version}-patchlevel%{patchlevel}
  24. # %setup -q
  25. %build
  26. %{__make}
  27. %install
  28. INSTALLDIR=${RPM_BUILD_ROOT}%{_libdir}/ocaml
  29. MYCONF=my.conf
  30. touch ${MYCONF}
  31. %{__mkdir_p} ${INSTALLDIR}
  32. %{__make} install \
  33. OCAMLFIND_INSTFLAGS="-destdir ${INSTALLDIR} -ldconf ${MYCONF}"
  34. %clean
  35. %{__rm} -rf ${RPM_BUILD_ROOT}
  36. %post
  37. echo "%{_libdir}/ocaml/%{pkg_name}" >> %{_libdir}/ocaml/ld.conf
  38. %preun
  39. %{__perl} -pi -e "s|^%{_libdir}/ocaml/%{pkg_name}\n$||" \
  40. %{_libdir}/ocaml/ld.conf
  41. %files
  42. %doc doc/camlpdf/html examples
  43. %doc Changes LICENSE README.md introduction_to_camlpdf.pdf
  44. %{_libdir}/ocaml/camlpdf
  45. %changelog
  46. * Sun Apr 15 2018 Toshiaki Ara <ara_t@384.jp> 2.2.p1
  47. - initial build for Vine Linux