psutils.spec 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ##
  2. ## psutils.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2017 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_psutils 1.23
  25. %define V_gnulib 20170924
  26. # package information
  27. Name: psutils
  28. Summary: Postscript Utilities
  29. URL: https://github.com/rrthomas/psutils
  30. Vendor: Angus Duggan et al.
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: BASE
  34. Group: Postscript
  35. License: GPL
  36. Version: %{V_psutils}
  37. Release: 20170924
  38. # list of sources
  39. Source0: https://github.com/rrthomas/psutils/archive/v%{V_psutils}.tar.gz
  40. Source1: http://download.openpkg.org/components/versioned/gnulib/gnulib-%{V_gnulib}.tar.xz
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, automake, autoconf, libtool
  43. PreReq: OpenPKG, openpkg >= 20160101
  44. BuildPreReq: perl
  45. PreReq: perl
  46. %description
  47. Various utilties for manipulating Postscript files.
  48. %track
  49. prog psutils:psutils = {
  50. version = %{V_psutils}
  51. url = https://github.com/rrthomas/psutils/releases
  52. regex = v(__VER__)\.tar\.gz
  53. }
  54. prog psutils:gnulib = {
  55. version = %{V_gnulib}
  56. url = http://download.openpkg.org/components/versioned/gnulib/
  57. regex = gnulib-(__VER__)\.tar\.xz
  58. }
  59. %prep
  60. %setup -q -n psutils-%{version}
  61. %setup -q -T -D -a 1
  62. %build
  63. %{l_shtool} subst \
  64. -e 's;#!/usr/bin/env perl;%{l_prefix}/bin/perl;g' \
  65. extractres psjoin
  66. ./bootstrap \
  67. --skip-git \
  68. --gnulib-srcdir=gnulib
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. CPPFLAGS="%{l_cppflags}" \
  72. LDFLAGS="%{l_ldflags}" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --mandir=%{l_prefix}/man
  76. %{l_make} %{l_mflags -O}
  77. %install
  78. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  79. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  81. %files -f files
  82. %clean