data-isocodes.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ##
  2. ## data-isocodes.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2019 OpenPKG Project <http://openpkg.org/>
  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_opkg 4.4
  25. %define V_dist 4.4
  26. %define V_subdir 4.4
  27. # package information
  28. Name: data-isocodes
  29. Summary: Data: ISO Abbreviation Codes
  30. URL: http://www.openpkg.org/
  31. Vendor: OpenPKG
  32. Packager: OpenPKG Project
  33. Distribution: OpenPKG Community
  34. Class: BASE
  35. Group: Data
  36. License: Open Source
  37. Version: %{V_opkg}
  38. Release: 20191003
  39. # list of sources
  40. Source0: http://ftp.debian.org/debian/pool/main/i/iso-codes/iso-codes_%{V_dist}.orig.tar.xz
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, gettext
  43. PreReq: OpenPKG, openpkg >= 20160101
  44. %description
  45. This data collection packages provides data files for:
  46. - ISO-3166-1 Country Codes
  47. - ISO-3166-2 Country Subdivision Codes
  48. - ISO-3166-3 Country Codes
  49. - ISO-4217 Currency Codes
  50. - ISO-639-2 Language Codes
  51. - ISO-639-3 Language Subdivision Codes
  52. - ISO-639-5 Language Subdivision Codes
  53. - ISO-15924 Language Script Names
  54. %track
  55. prog data-isocodes = {
  56. version = %{V_dist}
  57. url = http://ftp.debian.org/debian/pool/main/i/iso-codes/
  58. regex = iso-codes_(__VER__)(\.orig)?\.tar\.xz
  59. }
  60. %prep
  61. %setup -q -n iso-codes-%{V_subdir}
  62. %build
  63. %install
  64. %{l_shtool} mkdir -f -p -m 755 \
  65. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes
  66. %{l_shtool} install -c \
  67. data/iso_3166-1.json \
  68. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-3166-1.json
  69. %{l_shtool} install -c \
  70. data/iso_3166-2.json \
  71. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-3166-2.json
  72. %{l_shtool} install -c \
  73. data/iso_3166-3.json \
  74. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-3166-3.json
  75. %{l_shtool} install -c \
  76. data/iso_4217.json \
  77. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-4217.json
  78. %{l_shtool} install -c \
  79. data/iso_639-2.json \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-639-2.json
  81. %{l_shtool} install -c \
  82. data/iso_639-3.json \
  83. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-639-3.json
  84. %{l_shtool} install -c \
  85. data/iso_639-5.json \
  86. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-639-5.json
  87. %{l_shtool} install -c \
  88. data/iso_15924.json \
  89. $RPM_BUILD_ROOT%{l_prefix}/share/data-isocodes/iso-15924.json
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  91. %files -f files
  92. %clean