pgbackrest.spec 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ##
  2. ## pgbackrest.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2022 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 information
  24. Name: pgbackrest
  25. Summary: PostgreSQL Backup/Restore Tool
  26. URL: https://pgbackrest.org/
  27. Vendor: David Steele
  28. Packager: OpenPKG Project
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: RDBMS
  32. License: GPL
  33. Version: 2.37
  34. Release: 20220103
  35. # list of sources
  36. Source0: https://github.com/pgbackrest/pgbackrest/archive/release/%{version}.tar.gz
  37. Patch0: pgbackrest.patch
  38. # build information
  39. BuildPreReq: OpenPKG, openpkg >= 20160101, perl, gcc
  40. PreReq: OpenPKG, openpkg >= 20160101, perl
  41. %description
  42. pgBackRest aims to be a simple, reliable backup and restore
  43. system that can seamlessly scale up to the largest databases and
  44. workloads. Instead of relying on traditional backup tools like tar
  45. and rsync, pgBackRest implements all backup features internally
  46. and uses a custom protocol for communicating with remote systems.
  47. Removing reliance on tar and rsync allows for better solutions to
  48. database-specific backup challenges. The custom remote protocol
  49. allows for more flexibility and limits the types of connections that
  50. are required to perform a backup which increases security.
  51. %track
  52. prog pgbackrest = {
  53. version = %{version}
  54. url = https://github.com/pgbackrest/pgbackrest/releases
  55. regex = (__VER__)\.tar\.gz
  56. }
  57. %prep
  58. %setup -q -n pgbackrest-release-%{version}
  59. %patch -p0
  60. %build
  61. %{l_shtool} subst \
  62. -e 's;/var/lib/pgbackrest;%{l_prefix}/var/pgbackrest/log;g' \
  63. build/lib/pgBackRestBuild/Config/Data.pm
  64. cd src
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. CPPFLAGS="%{l_cppflags}" \
  68. LDFLAGS="%{l_ldflags}" \
  69. LIBS="`pkg-config libxml-2.0 --libs`" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --disable-shared \
  73. --disable-nls
  74. %{l_make} %{l_mflags -O}
  75. %install
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin \
  78. $RPM_BUILD_ROOT%{l_prefix}/var/pgbackrest/log
  79. %{l_shtool} install -c -s -m 755 \
  80. src/pgbackrest $RPM_BUILD_ROOT%{l_prefix}/bin/
  81. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  82. %files -f files
  83. %clean