package created using the webbuild interface [release 1.1.4-1mamba;Sun Feb 04 2024]

This commit is contained in:
Silvan Calarco 2024-02-05 09:38:55 +01:00
parent 2d3e88417a
commit 09f391eccb
3 changed files with 107 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# pystring
C++ functions matching the interface and behavior of python string methods with std::string.

View File

@ -0,0 +1,33 @@
From 74700b2c04adcdfa9b081526c514859b62304ecd Mon Sep 17 00:00:00 2001
From: Sven-Hendrik Haase <svenstaro@gmail.com>
Date: Thu, 4 May 2023 03:42:21 +0200
Subject: [PATCH] Proper installation paths
It's Makefile convention to be able to install to `DESTDIR`. This is especially important for packaging on Linux distributions but might be convenient for other users as well. Also this introduces `PREFIX`, another convention.
---
Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5ac4d7e..a0df9aa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
LIBTOOL ?= libtool
-LIBDIR ?= /usr/lib
+PREFIX ?= /usr
+INCLUDEDIR ?= ${PREFIX}/include/pystring
+LIBDIR ?= ${PREFIX}/lib
CXX ?= g++
CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2
@@ -12,7 +14,8 @@ libpystring.la: pystring.lo
$(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR)
install: libpystring.la
- $(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$<
+ $(LIBTOOL) --mode=install install -Dm755 $< $(DESTDIR)$(LIBDIR)/$<
+ $(LIBTOOL) --mode=install install -Dm644 pystring.h $(DESTDIR)$(INCLUDEDIR)/pystring.h
clean:
$(RM) -fr pystring.lo pystring.o libpystring.la .libs

72
pystring.spec Normal file
View File

@ -0,0 +1,72 @@
Name: pystring
Version: 1.1.4
Release: 1mamba
Summary: C++ functions matching the interface and behavior of python string methods with std::string
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/imageworks/pystring
Source: https://github.com/imageworks/pystring.git/v%{version}/pystring-%{version}.tar.bz2
Patch0: pystring-1.1.4-fix-makefile.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
C++ functions matching the interface and behavior of python string methods with std::string.
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%patch 0 -p1 -b .fix-makefile
%build
%make LIBDIR=%{_libdir}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall LIBDIR=%{_libdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libpystring.so.*
%doc LICENSE
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/pystring
%{_includedir}/pystring/pystring.h
%{_libdir}/libpystring.a
%{_libdir}/libpystring.so
%doc README.md
%changelog
* Sun Feb 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.4-1mamba
- package created using the webbuild interface