diff --git a/getmac-0.8.3.tar.gz b/getmac-0.8.3.tar.gz deleted file mode 100644 index 6ed24d42a7bc2a77d94af5b349e16d6419678f2d..0000000000000000000000000000000000000000 Binary files a/getmac-0.8.3.tar.gz and /dev/null differ diff --git a/getmac-0.9.2.tar.gz b/getmac-0.9.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ee1e9570e12d2df0bed362b11d0a485a17b2c1f0 Binary files /dev/null and b/getmac-0.9.2.tar.gz differ diff --git a/python-getmac.spec b/python-getmac.spec index f8b67989f0d3c8dc82529c85f9a8510ef4b09a15..ea90b8588c8952466eb6c59779f08e1935209187 100644 --- a/python-getmac.spec +++ b/python-getmac.spec @@ -1,15 +1,12 @@ -Name: python-getmac -Version: 0.8.3 -Release: 1 -Summary: Python module to get the MAC address of local network interfaces and LAN hosts - -License: MIT -URL: https://github.com/GhostofGoes/getmac -Source0: https://github.com/GhostofGoes/getmac/releases/download/0.8.3/getmac-0.8.3.tar.gz - -BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3-setuptools +%global _empty_manifest_terminate_build 0 +Name: python-getmac +Version: 0.9.2 +Release: 1 +Summary: Python module to get the MAC address of local network interfaces and LAN hosts +License: MIT +URL: https://github.com/GhostofGoes/getmac +Source0: https://files.pythonhosted.org/packages/2a/73/db1881ea1db217486365c8a79a44b4689b51791fd506d11501967b90ef49/getmac-0.9.2.tar.gz +BuildArch: noarch %description Pure-python module to get the MAC address of remote hosts or network interfaces. @@ -18,34 +15,74 @@ interfaces on the local system(by interface name) and remote hosts on the local network (by IPv4/IPv6 address or host-name). %package -n python3-getmac -Summary: %{summary} -%{?python_provide:%python_provide python3-getmac} - +Summary: Python module to get the MAC address of local network interfaces and LAN hosts +Provides: python-getmac = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: python3-setuptools %description -n python3-getmac Pure-python module to get the MAC address of remote hosts or network interfaces. It provides a platform-independent interface to get the MAC addresses of network interfaces on the local system(by interface name) and remote hosts on the local network (by IPv4/IPv6 address or host-name). +%package help +Summary: Development documents and examples for getmac +Provides: python3-getmac-doc +%description help +Pure-python module to get the MAC address of remote hosts or network interfaces. +It provides a platform-independent interface to get the MAC addresses of network +interfaces on the local system(by interface name) and remote hosts on the local +network (by IPv4/IPv6 address or host-name). + %prep %autosetup -n getmac-%{version} %build -sed -i '1{/^#!\//d}' getmac/__main__.py %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 +if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.txt ]; then cp -af README.txt %{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 . -%files -n python3-getmac +%files -n python3-getmac -f filelist.lst %license LICENSE -%doc README.md -%{python3_sitelib}/getmac/ -%{python3_sitelib}/getmac-*.egg-info/ +%dir %{python3_sitelib}/* /usr/bin/getmac -%{_mandir}/man1/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Mon Mar 06 2023 wangjunqi - 0.9.2-1 +- Update package to version 0.9.2 + * Tue Aug 02 2022 fushanqing - 0.8.3-1 - update to 0.8.3