%bcond_without static # build without dar_static
%bcond_without static_libs # don't build static libraries
#
+%if %{with static}
+%define with_static_libs 1
+%endif
+#
Summary: dar makes backup of a directory tree and files
Summary(pl): dar - narzêdzie do tworzenia kopii zapasowych drzew katalogów i plików
Name: dar
Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# don't generate `Requires' for sample scripts
+%define _noautoreq bash perl
+
%description
dar is a shell command, that makes backup of a directory tree and
files.
%description libs-static -l pl
Statyczna wersja biblioteki dar.
+%package doc
+Summary: dar - documentation
+Summary(pl): dar - dokumentacja
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Dar ducumentation.
+
+%description -l pl
+Dokumentacja dla dar.
+
%prep
%setup -q
%patch0 -p1
%build
+%{__gettextize}
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%configure \
%{!?with_ea:--disable-ea-support} \
%{!?with_static:--disable-dar-static} \
- %{!?with_static_libs:--disable-static} \
+ --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no} \
--enable-mode=64 \
--disable-upx
%{__make}
%{?with_static:mv -f $RPM_BUILD_ROOT{%{_bindir},/bin}/dar_static}
-find $RPM_BUILD_DIR/%{name}-%{version}/doc -name "Makefile*" -o -name "Doxyfile*" -o -name dar-catalog-1.0.dtd | xargs rm -f
-mkdir -p devel-doc
-mv -f doc/html/* devel-doc
-rm -rf doc/html
+ln -sf %{_datadir}/%{name} misc/doc
%find_lang %{name}
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc ChangeLog NEWS README THANKS TODO doc
+%doc ChangeLog NEWS README THANKS TODO misc/doc
%attr(755,root,root) %{_bindir}/*
-%{_datadir}/%{name}
%{_mandir}/man1/*
%files libs
%files devel
%defattr(644,root,root,755)
-%doc devel-doc/*
%attr(755,root,root) %{_libdir}/libdar64.so
%{_libdir}/libdar64.la
%{_includedir}/dar
%defattr(644,root,root,755)
%{_libdir}/libdar64.a
%endif
+
+%files doc
+%defattr(644,root,root,755)
+%{_datadir}/%{name}