LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xchroot.spec of Package xchroot (Project home:estellnb:elstel)

#
# spec file for package 
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           xchroot
Version:	2.3.2	
Release:	1
License:	S-FSL v1.1
Summary:	chroot for Xorg/X11 with unionfs/aufs support
Url: https://www.elstel.org/xchroot
Group:	Development/Tools/Building
Group:	System/X11/Utilities
Source0: %{name}-v%{version}
Source1: %{name}-doc-2013-10-28.tar.gz
Source2: xchroot.8
BuildRequires: coreutils, man
BuildArch: noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
xchroot is a little convenience bash script that will allow you to run X-based programs in a chroot environment.  You may also chroot to a new environment without touching any of its files either by using aufs or unionfs. You may backup your temporary changes on exit and kill of xchroot as squashfs incrementally and restore them.  
Authors:
--------
    Elmar Stellnberger <estellnb@elstel.org>


%prep
#tar -xzf %{source1}
%setup -T -b 1 -n www.elstel.org

%build
chmod +x %{SOURCE0}
%{SOURCE0} --license >COPYING
sed -n '2,/^$/p' <%{SOURCE0} | sed 's/^#//' >ChangeLog
pushd $RPM_BUILD_DIR/www.elstel.org
 mv auxil/* xchroot/
 sed -i 's#/auxil/##' xchroot/*.html
popd
sed "s#/usr/share/doc\[/packages\]/xchroot#%_docdir/xchroot#" %{SOURCE2} | gzip -c >xchroot.8.gz

%install
mkdir -p %{buildroot}/usr/sbin
install %{SOURCE0} %{buildroot}/usr/sbin/xchroot
mkdir -p %{buildroot}%_mandir/man8/
install -m 0644 xchroot.8.gz %{buildroot}%_mandir/man8/

#mkdir -p %{buildroot}/usr/share/doc/packages/%{name}-%{version}
#pushd $RPM_BUILD_DIR/www.elstel.org/xchroot
#  install * %{buildroot}/usr/share/doc/packages/%{name}-%{version}/
#popd

%post
if which mandb 1>&2 2>/dev/null; then MANPATH= mandb -f %_mandir/man8/xchroot.8.gz || echo "man page will be added to search index by next cron daily invocation ... " >&2
elif which makemandb 1>&2 2>/dev/null; then makemandb
else makewhatis
fi

%postun
if which mandb 1>&2 2>/dev/null; then MANPATH= mandb -qf %_mandir/man8/xchroot.8.gz || true
elif which makemandb 1>&2 2>/dev/null; then makemandb
else makewhatis
fi


%files
%defattr(-,root,root)
/usr/sbin/xchroot
%defattr(-,root,root)
%doc ChangeLog COPYING 
%doc xchroot/*
%doc %_mandir/man8/xchroot.8.gz

%changelog