acmetool.spec 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ##
  2. ## acmetool.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2016 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 information
  24. %define V_acmetool_base 20160116
  25. %define V_acmetool_snap 20160116
  26. # package information
  27. Name: acmetool
  28. Summary: ACME Client Utility
  29. URL: https://github.com/hlandau/acme
  30. Vendor: Hugo Landau
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Cryptography
  35. License: MIT
  36. Version: %{V_acmetool_base}
  37. Release: 20160116
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/acmetool/acmetool-%{V_acmetool_snap}.tar.xz
  40. # build information
  41. BuildPreReq: OpenPKG, openpkg >= 20140101, go
  42. PreReq: OpenPKG, openpkg >= 20140101
  43. %description
  44. ACMETool is an easy-to-use command line tool for automatically
  45. acquiring certificates from ACME servers (such as Let's Encrypt).
  46. Designed to flexibly integrate into your webserver setup to enable
  47. automatic verification. Unlike the official Let's Encrypt client,
  48. this doesn't modify your web server configuration.
  49. %track
  50. prog acmetool = {
  51. version = %{V_acmetool_snap}
  52. url = http://download.openpkg.org/components/versioned/acmetool/
  53. regex = acmetool-(__VER__)\.tar\.xz
  54. }
  55. %prep
  56. %setup -q -n acmetool
  57. %build
  58. # build program
  59. export GOPATH=`pwd`
  60. cd $GOPATH/src/github.com/hlandau/acme
  61. go build -x \
  62. -ldflags "-X github.com/hlandau/degoutils/buildinfo.RawBuildInfo=XX" \
  63. -o acmetool \
  64. cmd/acmetool/main.go \
  65. cmd/acmetool/quickstart-nlinux.go \
  66. cmd/acmetool/quickstart.go \
  67. cmd/acmetool/le-import.go
  68. %install
  69. # create directory hierarchy
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin
  72. # install program
  73. %{l_shtool} install -c -s -m 755 \
  74. src/github.com/hlandau/acme/acmetool \
  75. $RPM_BUILD_ROOT%{l_prefix}/bin/
  76. # determine installation files
  77. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  78. %files -f files
  79. %clean