dar.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## dar.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. Name: dar
  25. Summary: Disk Archiver
  26. URL: http://dar.linux.free.fr/
  27. Vendor: Denis Corbin et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Archiver
  32. License: GPL
  33. Version: 2.5.7
  34. Release: 20161030
  35. # list of sources
  36. Source0: http://downloads.sourceforge.net/dar/dar-%{version}.tar.gz
  37. Patch0: dar.patch
  38. # build information
  39. BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, gcc::with_cxx = yes
  40. PreReq: OpenPKG, openpkg >= 20160101
  41. BuildPreReq: getopt, bzip2, zlib, gcrypt, gpg-error, lzo
  42. PreReq: getopt, bzip2, zlib, gcrypt, gpg-error, lzo
  43. %description
  44. dar(1) is a shell command that backups directory trees and files.
  45. It provides filters, differential backup, slices, directory tree
  46. snapshots, compression, direct file access, hard link consideration,
  47. extended attributes, archive testing, remote operations, isolation,
  48. scrambling, strong encryption, flat restore, data protection,
  49. archive merging, archive subsetting, etc.
  50. %track
  51. prog dar = {
  52. version = %{version}
  53. url = http://sourceforge.net/projects/dar/files/
  54. regex = dar-(\d+\.\d+\.\d+)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %patch -p0
  59. %build
  60. %{l_shtool} subst \
  61. -e 's;-lgnugetopt;-lgetopt;g' \
  62. -e 's;<getopt.h>;"getopt.h";g' \
  63. configure
  64. ( echo "ac_cv_lib_gnugetopt_getopt_long=yes"
  65. ) >config.cache
  66. CC="%{l_cc}" \
  67. CXX="%{l_cxx}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. CXXFLAGS="%{l_cxxflags -O}" \
  70. CPPFLAGS="%{l_cppflags}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. LIBS="-lgetopt" \
  73. ./configure \
  74. --cache-file=./config.cache \
  75. --prefix=%{l_prefix} \
  76. --sysconfdir=%{l_prefix}/etc/dar \
  77. --mandir=%{l_prefix}/man \
  78. --disable-thread-safe \
  79. --disable-dar-static \
  80. --disable-upx \
  81. --disable-shared \
  82. --disable-nls
  83. %{l_make} %{l_mflags -O}
  84. %install
  85. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/dar >/dev/null 2>&1 || true
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  89. %{l_files_std} \
  90. '%config %{l_prefix}/etc/dar/*'
  91. %files -f files
  92. %clean