[packages/ghc-indexed-traversable-instances] Initial
arekm
arekm at pld-linux.org
Sun Nov 29 15:19:06 CET 2026
commit 58d71ee5665a25a5972a060e8cc2e7c311105a8c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Oct 17 19:42:41 2026 +0200
Initial
ghc-indexed-traversable-instances.spec | 132 +++++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
---
diff --git a/ghc-indexed-traversable-instances.spec b/ghc-indexed-traversable-instances.spec
new file mode 100644
index 0000000..4130823
--- /dev/null
+++ b/ghc-indexed-traversable-instances.spec
@@ -0,0 +1,132 @@
+#
+# Conditional build:
+%bcond_without prof # profiling library
+#
+%define pkgname indexed-traversable-instances
+Summary: More instances of FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
+Name: ghc-%{pkgname}
+Version: 0.1.2
+Release: 1
+License: BSD
+Group: Development/Languages
+#Source0Download: https://hackage.haskell.org/package/indexed-traversable-instances
+Source0: https://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: d1539c3bd202683d848a3df8fc4bf9b1
+URL: https://hackage.haskell.org/package/indexed-traversable-instances
+# 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: 5ab90b3b6dc36142314f4990a4c3e845
+BuildRequires: ghc
+BuildRequires: ghc-OneTuple
+BuildRequires: ghc-indexed-traversable
+BuildRequires: ghc-tagged
+BuildRequires: ghc-unordered-containers
+BuildRequires: ghc-vector
+%if %{with prof}
+BuildRequires: ghc-prof
+BuildRequires: ghc-OneTuple-prof
+BuildRequires: ghc-indexed-traversable-prof
+BuildRequires: ghc-tagged-prof
+BuildRequires: ghc-unordered-containers-prof
+BuildRequires: ghc-vector-prof
+%endif
+BuildRequires: rpmbuild(macros) >= 1.608
+%requires_eq ghc
+Requires(post,postun): /usr/bin/ghc-pkg
+Requires: ghc-OneTuple
+Requires: ghc-indexed-traversable
+Requires: ghc-tagged
+Requires: ghc-unordered-containers
+Requires: ghc-vector
+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 extra instances for type-classes in the
+[indexed-traversable](https://hackage.haskell.org/package/indexed-
+traversable) package.
+
+The intention is to keep this package minimal; it provides instances
+that formely existed in @lens@ or @optics-extra at . We recommend putting
+other instances directly into their defining packages. The @indexed-
+traversable@ package is light, having only GHC boot libraries as its
+dependencies.
+
+%package prof
+Summary: Profiling %{pkgname} library for GHC
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: ghc-OneTuple-prof
+Requires: ghc-indexed-traversable-prof
+Requires: ghc-tagged-prof
+Requires: ghc-unordered-containers-prof
+Requires: ghc-vector-prof
+
+%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
+
+# tarball ships no Setup script
+echo 'import Distribution.Simple; main = defaultMain' > Setup.hs
+
+%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 Changelog.md LICENSE %{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-indexed-traversable-instances.git/commitdiff/58d71ee5665a25a5972a060e8cc2e7c311105a8c
More information about the pld-cvs-commit
mailing list