diff --git a/libmount-0.9.tar.gz b/libmount-0.9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d7bbeb89db4ddc9fa7d9ddd3044cc1d042e84de7 Binary files /dev/null and b/libmount-0.9.tar.gz differ diff --git a/python-libmount.spec b/python-libmount.spec new file mode 100644 index 0000000000000000000000000000000000000000..152c100346ca4a6cce522b20a1249b05f8ac2871 --- /dev/null +++ b/python-libmount.spec @@ -0,0 +1,79 @@ +%global _empty_manifest_terminate_build 0 +Name: python-libmount +Version: 0.9 +Release: 1 +Summary: A wrapper around libmount, for reading and manipulating filesystem tables. +License: BSD +URL: https://github.com/ox-it/python-libmount +Source0: https://files.pythonhosted.org/packages/fe/4d/3bd201d78d9ff51c2eeb278603dae915ef695999fb4cc132a28cc6f1cd0a/libmount-0.9.tar.gz +BuildArch: noarch + + +%description +A library for reading and manipulating filesystem tables, such as ``/etc/fstab``. +It uses ``ctypes`` to wrap ``libmount``, part of +`util-linux `_. + +%package -n python3-libmount +Summary: A wrapper around libmount, for reading and manipulating filesystem tables. +Provides: python-libmount +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%description -n python3-libmount +A library for reading and manipulating filesystem tables, such as ``/etc/fstab``. +It uses ``ctypes`` to wrap ``libmount``, part of +`util-linux `_. + +%package help +Summary: Development documents and examples for libmount +Provides: python3-libmount-doc +%description help +A library for reading and manipulating filesystem tables, such as ``/etc/fstab``. +It uses ``ctypes`` to wrap ``libmount``, part of +`util-linux `_. + +%prep +%autosetup -n libmount-0.9 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . +sed -i 's/\(^.*$\)/"\1"/g' filelist.lst doclist.lst +find %{buildroot} -type f -exec file {} ';' | grep "\" | awk -F ':' '{print $1}' | xargs -i chrpath --delete "{}" + +%files -n python3-libmount -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri Dec 10 2021 yinzehao - 0.9-1 +- Package Spec generated