[packages/ghc-os-string] new, version 2.0.7

arekm arekm at pld-linux.org
Sat Oct 17 19:45:17 CEST 2026


commit c88dfdccc7f0eb3d5dcaeac1e9d47c3a5d46fef3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Oct 17 19:42:46 2026 +0200

    new, version 2.0.7

 ghc-os-string.spec | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
---
diff --git a/ghc-os-string.spec b/ghc-os-string.spec
new file mode 100644
index 0000000..85b1609
--- /dev/null
+++ b/ghc-os-string.spec
@@ -0,0 +1,102 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
+%define		pkgname	os-string
+Summary:	Library for manipulating Operating system strings.
+Name:		ghc-%{pkgname}
+Version:	2.0.7
+Release:	1
+License:	BSD
+Group:		Development/Languages
+#Source0Download: https://hackage.haskell.org/package/os-string
+Source0:	https://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5:	45efe036b6b2385a9ac8a119e1ae9dd7
+URL:		https://hackage.haskell.org/package/os-string
+# Hackage revision 1 of the .cabal file (relaxed dependency bounds)
+Source1:	https://hackage.haskell.org/package/%{pkgname}-%{version}/revision/1.cabal?/%{pkgname}-%{version}-r1.cabal
+# Source1-md5:	e94c8c7d9d6beda28c6269048d040a0d
+BuildRequires:	ghc
+%if %{with prof}
+BuildRequires:	ghc-prof
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.608
+%requires_eq	ghc
+Requires(post,postun):	/usr/bin/ghc-pkg
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# debuginfo is not useful for ghc
+%define		_enable_debug_packages	0
+
+# don't compress haddock files
+%define		_noautocompressdoc	*.haddock
+
+%description
+This package provides functionality for manipulating @OsString@
+values, and is shipped with <https://www.haskell.org/ghc/ GHC>.
+
+%package prof
+Summary:	Profiling %{pkgname} library for GHC
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description prof
+Profiling %{pkgname} library for GHC. Should be installed when GHC's
+profiling subsystem is needed.
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+cp -p %{SOURCE1} %{pkgname}.cabal
+
+%build
+runhaskell Setup.hs configure -v2 \
+	%{?with_prof:--enable-library-profiling} \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--libexecdir=%{_libexecdir} \
+	--docdir=%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs build
+
+runhaskell Setup.hs haddock --executables
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/lib/package.conf.d
+
+runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
+
+# work around automatic haddock docs installation
+rm -rf %{name}-%{version}-doc
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
+
+runhaskell Setup.hs register \
+	--gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/lib/package.conf.d/%{pkgname}.conf
+
+# the library directory name contains an ABI hash, so build the file lists
+pkgdir=$(echo $RPM_BUILD_ROOT%{_libdir}/*-linux-%{ghcdir}/%{pkgname}-%{version}-*)
+find $pkgdir -type d | sed -e "s|^$RPM_BUILD_ROOT|%dir |" > %{name}.files
+find $pkgdir -type f ! -name '*_p.a' ! -name '*.p_hi' | sed -e "s|^$RPM_BUILD_ROOT||" >> %{name}.files
+find $pkgdir -type f \( -name '*_p.a' -o -name '*.p_hi' \) | sed -e "s|^$RPM_BUILD_ROOT||" > %{name}-prof.files
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%ghc_pkg_recache
+
+%postun
+%ghc_pkg_recache
+
+%files -f %{name}.files
+%defattr(644,root,root,755)
+%doc LICENSE README.md changelog.md %{name}-%{version}-doc/html
+%{_libdir}/%{ghcdir}/lib/package.conf.d/%{pkgname}.conf
+%dir %{_libdir}/*-linux-%{ghcdir}
+%{_libdir}/*-linux-%{ghcdir}/libHS%{pkgname}-%{version}-*.so
+
+%if %{with prof}
+%files prof -f %{name}-prof.files
+%defattr(644,root,root,755)
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-os-string.git/commitdiff/c88dfdccc7f0eb3d5dcaeac1e9d47c3a5d46fef3



More information about the pld-cvs-commit mailing list