Browse Source

dar-2.7.7-1

Tomohiro "Tomo-p" KATO 1 year ago
parent
commit
b7747b46f7
1 changed files with 38 additions and 5 deletions
  1. 38 5
      d/dar/dar-vl.spec

+ 38 - 5
d/dar/dar-vl.spec

@@ -1,7 +1,9 @@
+%bcond_with static
+
 Name:           dar
 Summary:        Disk ARchive: Backup directory tree and files
 Summary(ja):    ディスクアーカイブ: ディレクトリツリーとファイルをバックアップ
-Version:        2.6.13
+Version:        2.7.7
 Release:        1%{?_dist_release}
 Group:          accessories
 Vendor:         Project Vine
@@ -10,17 +12,22 @@ Distribution:   Vine Linux
 License:        GPLv2+
 URL:            http://dar.linux.free.fr/
 
-Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Source0:        https://github.com/Edrusb/DAR/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
+BuildRequires:  curl-devel
 BuildRequires:  e2fsprogs-devel
 BuildRequires:  libattr-devel
 BuildRequires:  libgcrypt-devel
-BuildRequires:  openssl-devel
 BuildRequires:  lzo-devel
+BuildRequires:  openssl-devel
 BuildRequires:  zlib-devel
 BuildRequires:  bzip2-devel
 BuildRequires:  xz-devel
+%if %{with static}
+BuildRequires:  glibc-static
+BuildRequires:  libstdc++-static
+%endif
 
 Requires:       par2cmdline
 
@@ -54,14 +61,30 @@ This package contains the header files and libraries for developing
 programs that use the DAR API (libdar).
 
 
+%package static
+Summary: Statically linked version of dar
+Group:          accessories
+
+%description static
+Statically linked version of dar that can be installed onto backup disks for
+easier file retrieval.
+
+
 %debug_package
 
 
 %prep
-%setup -q
+%setup -q -n DAR-%{version}
 
 %build
-%configure --disable-build-html --disable-dar-static --disable-static
+%if %{with static}
+STATIC=""
+%else
+STATIC="--disable-dar-static --disable-static"
+%endif
+
+sh misc/init
+%configure --disable-build-html --enable-mode=64 $STATIC
 
 # Remove Rpath
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@@ -77,6 +100,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
 # Remove the libtool archive files
 #rm -rf $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/
 rm -f  $RPM_BUILD_ROOT/%{_libdir}/*.la
+rm -f  $RPM_BUILD_ROOT/%{_libdir}/*.a
 
 # Delete the sample files that we can't seem to disable
 rm -rf $RPM_BUILD_ROOT/%{_datadir}/dar/
@@ -120,8 +144,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
 
+%if %{with static}
+%files static
+%defattr(-,root,root,-)
+%{_bindir}/dar_static
+%endif
+
 
 %changelog
+* Tue Nov 29 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.7.7-1
+- new upstream release.
+
 * Wed Mar 10 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.6.13-1
 - new upstream release.
 - dropped scriptlets.