diff --git a/make-build-flags-adjust.patch b/make-build-flags-adjust.patch deleted file mode 100644 index 44c44022542130ea7e09e0098b8ca5a431db134a..0000000000000000000000000000000000000000 --- a/make-build-flags-adjust.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 815c6bc3f4d8fc7003b779bb8880a075134b3706 Mon Sep 17 00:00:00 2001 -From: hanjinpeng -Date: Sat, 3 Sep 2022 14:53:18 +0800 -Subject: [PATCH] make build flags adjust - ---- - Makefile.common | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/Makefile.common b/Makefile.common -index f8c6e19..af08791 100644 ---- a/Makefile.common -+++ b/Makefile.common -@@ -1,27 +1,26 @@ - PYTHONVER?=3.7 - PYTHONDIR=$(DESTDIR)/usr/lib/python$(PYTHONVER)/dist-packages/ --PYTHONINCLUDE=/usr/include/python$(PYTHONVER)/ - - CC = gcc --CFLAGS = -g -Wall -I$(PYTHONINCLUDE) $(DEFINES) --LDFLAGS = -+CFLAGS = -g -Wall $(shell pkgconf python$(PYTHONPKGVER) --cflags) $(DEFINES) -+LDFLAGS = $(shell pkgconf python$(PYTHONPKGVER) --libs) - --all: utmpaccessmodule.so UTMPCONST.py -+all: utmpaccess.so UTMPCONST.py - - - utmpaccessmodule.o: utmpaccessmodule.c - $(CC) $(CFLAGS) -fpic -c utmpaccessmodule.c - --utmpaccessmodule.so: utmpaccessmodule.o -- $(CC) $(CFLAGS) $(LDFLAGS) -fpic -shared utmpaccessmodule.o -o utmpaccessmodule.so -+utmpaccess.so: utmpaccessmodule.o -+ $(CC) $(CFLAGS) $(LDFLAGS) -fpic -shared utmpaccessmodule.o -o utmpaccess.so - - UTMPCONST.py: constants.h makeconst.c makeconst.sh - ./makeconst.sh $(CFLAGS) - - clean: -- rm -f *~ *.o utmpaccessmodule.so *.pyc UTMPCONST.py makeconst -+ rm -f *~ *.o utmpaccess.so *.pyc UTMPCONST.py makeconst - - install: - mkdir -p $(PYTHONDIR) -- cp -f utmpaccessmodule.so utmp.py UTMPCONST.py $(PYTHONDIR) -+ cp -f utmpaccess.so utmp.py UTMPCONST.py $(PYTHONDIR) - --- -2.27.0 - diff --git a/python-utmp.spec b/python-utmp.spec index d76ec7556bc4d22990b7d9bd64f8005cb7b8144d..a2b4663dd63e86d1578bd84f4f270520bfa887d7 100644 --- a/python-utmp.spec +++ b/python-utmp.spec @@ -1,70 +1,79 @@ +%global _empty_manifest_terminate_build 0 Name: python-utmp -Version: 0.9 +Version: 21.10.0 Release: 1 Summary: Python modules for umtp records - License: PSF-2.0 URL: http://kassiopeia.juls.savba.sk/~garabik/software/python-utmp/ -Source0: https://github.com/garabik/python-utmp/archive/refs/tags/v%{version}.tar.gz - -# Need to change the name of the shared library we create, so it is the same as the name -# of the module we import, or else Python will not be able to import it. -# And use the correct include paths. -Patch0: make-build-flags-adjust.patch - -BuildRequires: make -BuildRequires: gcc -BuildRequires: pkgconf +Source0: https://files.pythonhosted.org/packages/9e/75/34181e310c9ffc70535f46169807d0ff4d68b0277d79e3e255cfe6555938/utmp-21.10.0.tar.gz -%global _description %{expand: -python-utmp consists of three modules, providing access to utmp records. -It is quite difficult to access utmp record portably, because every UNIX -has different structure of utmp files. Currently, python-utmp works on -platforms which provide getutent, getutid, getutline, pututline, -setutent, endutent and utmpname functions (such as GNU systems -(Linux and hurd) and System V unices) and on BSD systems using -simple utmp structure.} +%description -%description %_description %package -n python3-utmp -Summary: Python modules for umtp records +Summary: Python modules for umtp records +Provides: python-utmp = %{version}-%{release} +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconf BuildRequires: python3-devel -%{?python_provide:%python_provide python3-utmp} +BuildRequires: python3-pip +%description -n python3-utmp -%description -n python3-utmp %_description -%prep -%autosetup -n %{name}-%{version} -p1 +%package help +Summary: Development documents and examples for utmp +Provides: python3-utmp-doc +%description help +%prep +%autosetup -n utmp-%{version} + %build -%set_build_flags -make -f Makefile.glibc \ - DEFINES=" \ - -D_HAVE_UT_SESSION -D_HAVE_UT_ADDR_V6 -D_HAVE_UT_EXIT \ - -D_HAVE_UT_HOST -D_HAVE_UT_ID -D_HAVE_UT_TV -D_HAVE_UT_USER \ - -D_HAVE_UTMPNAME -D_HAVE_SETUTENT -D_HAVE_GETUTENT -D_HAVE_ENDUTENT \ - -D_HAVE_GETUTID -D_HAVE_GETUTLINE -D_HAVE_PUTUTLINE \ - %{optflags}" \ - PYTHONPKGVER=3 \ - PYTHONVER=%{python3_version} \ - PYTHONINCLUDE=/usr/include/python%{python3_version}/ +%py3_build %install -make \ - PYTHONDIR=%{buildroot}/%{python3_sitearch}/ \ - PYTHONVER=%{python3_version} \ - install -rm -f COPYING -install -D -p -m644 debian/copyright COPYING +%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-utmp -%license COPYING -%doc README TODO -%{python3_sitearch}/* +%files -n python3-utmp -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Fri Jul 07 2023 chenzixuan - 21.10.0-1 +- Update package to version 21.10.0 + * Fri Sep 2 2022 Han Jinpeng - 0.9-1 - Package init diff --git a/utmp-21.10.0.tar.gz b/utmp-21.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6a871df55ef6c536ee29e80575b2d038ba06ea88 Binary files /dev/null and b/utmp-21.10.0.tar.gz differ diff --git a/v0.9.tar.gz b/v0.9.tar.gz deleted file mode 100644 index bf69fd55af826c7ca6c184d398b69772dcf5d51d..0000000000000000000000000000000000000000 Binary files a/v0.9.tar.gz and /dev/null differ