-#TODO: proper pam configuration file
+#TODO:
+# - proper pam configuration file
+# - is schroot-kill-procs.patch still needed?
Summary: Execute commands under different root filesystems
Summary(pl.UTF-8): Wykonywanie poleceń w innym głównym systemie
Name: schroot
-Version: 1.0.5
+Version: 1.6.12
Release: 1
License: GPL
Group: Applications/System
-Source0: http://ftp.debian.org/debian/pool/main/s/schroot/%{name}_%{version}.orig.tar.gz
-# Source0-md5: 685c6e8c9a9d5de24e543031683b8e30
+Source0: http://ftp.debian.org/debian/pool/main/s/schroot/%{name}_%{version}.orig.tar.xz
+# Source0-md5: 99d5ddca2a0c977ffabea47ed486755a
Patch0: %{name}-kill-procs.patch
-URL: http://packages.qa.debian.org/s/schroot.html
-BuildRequires: autoconf
-BuildRequires: automake
+Patch1: %{name}-cmake.patch
+URL: https://tracker.debian.org/pkg/schroot
BuildRequires: boost-devel >= 1.35.0
+BuildRequires: cmake
BuildRequires: cppunit-devel
+BuildRequires: doxygen
BuildRequires: gettext-autopoint
BuildRequires: gettext-tools
BuildRequires: libuuid-devel
%description -l pl.UTF-8
Wykonywanie poleceń w innym głównym systemie.
-%prep
-%setup -q
-%patch0 -p1
+%package devel
+Summary: Header files for schroot
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
-%build
-sed -e "s/@RELEASE_DATE@/`date '+%d %b %Y'`/" -e "s/@RELEASE_UDATE@/`date '+%s'`/" scripts/schroot_release.m4.in > m4/schroot_release.m4
-%{__libtoolize}
-%{__autopoint}
-%{__aclocal} -I m4
-%{__autoheader}
-%{__automake}
-%{__autoconf}
+%description devel
+Header files for schroot.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe schroot
+
+%package static
+Summary: Static schroot library
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
-# workaround for g++ problems with arguments sequence
-sed -r -i -e "s:^(ac_link=.*)(-o conftest.*)(conftest.*ac_ext)(.*):\1 \3 \2 \4:" configure
+%description static
+Static schroot library.
-%configure
+%description static -l pl.UTF-8
+Biblioteka statyczna schroot
-%{__make} CC="%{__cc}"
+%package -n bash-completion-schroot
+Summary: bash-completion for schroot command
+Summary(pl.UTF-8): Bashowe uzupełnianie parametrów polecenia schroot
+Group: Applications/Shells
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: bash-completion >= 2.0
+BuildArch: noarch
+
+%description -n bash-completion-schroot
+This package provides bash-completion for schroot command.
+
+%description -n bash-completion-schroot -l pl.UTF-8
+Pakiet ten dostarcza bashowe uzupełnianie parametrów polecenia
+schroot.
+
+%prep
+%setup -q
+#%patch0 -p1
+%patch1 -p1
+%build
+install -d build
+cd build
+%cmake ..
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
cat > do_chroot << 'EOF'
%find_lang %{name} --all-name
+install -d $RPM_BUILD_ROOT%{bash_compdir}
+%{__mv} $RPM_BUILD_ROOT/etc/bash_completion.d/schroot $RPM_BUILD_ROOT%{bash_compdir}/schroot
+
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc README TODO debian/changelog
+%doc README README.md TODO
%{_mandir}/man?/*
%dir %{_sysconfdir}/%{name}
-%dir %{_sysconfdir}/%{name}/exec.d
+%dir %{_sysconfdir}/%{name}/buildd
+%dir %{_sysconfdir}/%{name}/chroot.d
+%dir %{_sysconfdir}/%{name}/default
+%dir %{_sysconfdir}/%{name}/desktop
+%dir %{_sysconfdir}/%{name}/minimal
+%dir %{_sysconfdir}/%{name}/sbuild
%dir %{_sysconfdir}/%{name}/setup.d
-%dir %{_libdir}/%{name}
-%dir /var/lib/%{name}
-%dir /var/lib/%{name}/mount
-%dir /var/lib/%{name}/session
+%dir %{_libexecdir}/%{name}
+%dir %{_datarootdir}/%{name}
+%dir %{_datarootdir}/%{name}/setup
+%dir %{_sharedstatedir}/%{name}
+%dir %{_sharedstatedir}/%{name}/session
+%dir %{_sharedstatedir}/%{name}/union
+%dir %{_sharedstatedir}/%{name}/unpack
%attr(4755,root,root) %{_bindir}/%{name}
%attr(755,root,root) %{_bindir}/do_chroot
-%attr(755,root,root) %{_libdir}/%{name}/*
-%attr(755,root,root) %{_sysconfdir}/%{name}/exec.d/*
+%attr(755,root,root) %{_libexecdir}/%{name}/*
+%{_sysconfdir}/%{name}/buildd/*
+%{_sysconfdir}/%{name}/default/*
+%{_sysconfdir}/%{name}/desktop/*
+%{_sysconfdir}/%{name}/minimal/*
+%{_sysconfdir}/%{name}/sbuild/*
%attr(755,root,root) %{_sysconfdir}/%{name}/setup.d/*
+%{_datarootdir}/%{name}/setup/*
%attr(640,root,root) %verify(not md5 mtime size) %config(noreplace) /etc/pam.d/%{name}
%attr(640,root,root) %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+
+%files devel
+%defattr(644,root,root,755)
+%dir %{_includedir}/sbuild
+%{_includedir}/sbuild/*.h
+%{_pkgconfigdir}/sbuild.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libsbuild.a
+
+%files -n bash-completion-schroot
+%defattr(644,root,root,755)
+%{bash_compdir}/schroot