Compare commits
139 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
da8b6a2c9f | ||
|
b918424076 | ||
|
3a116c6a29 | ||
|
6d69503ff3 | ||
|
fa4c615f86 | ||
|
2e806acfa1 | ||
|
18fd461ac2 | ||
|
90f14946a1 | ||
|
e429bfe81c | ||
|
e71475ee24 | ||
|
58f3979109 | ||
|
ce204c6b81 | ||
|
7d2510b141 | ||
|
0017f57fc4 | ||
|
323880f227 | ||
|
8400579198 | ||
|
dfacabb0d6 | ||
|
e7cc30b58f | ||
|
44501cb02b | ||
|
c6ebe00c11 | ||
|
3c68a12dbb | ||
|
030e119f14 | ||
|
fc5fb26e31 | ||
|
7e3e6494e2 | ||
|
668dd10c99 | ||
|
4ac79fbdbd | ||
|
acff114c1d | ||
|
1e680edbc7 | ||
|
dfe7e03c1c | ||
|
d5f701318c | ||
|
70d2298b04 | ||
|
eb63b71620 | ||
|
b6ba7540fe | ||
|
0fd2441bc1 | ||
|
b8cd891b77 | ||
|
4f552ad804 | ||
|
1facb30fc0 | ||
|
cfbb8bcbb7 | ||
|
f6aa817b92 | ||
|
bb41ad6f7b | ||
|
e780fd088d | ||
|
051b51f30f | ||
|
7f9cbd873d | ||
|
0b9d47c300 | ||
|
57481f9394 | ||
|
b47d44f086 | ||
|
9a341be0e1 | ||
|
22d34de16e | ||
|
db4b6534d4 | ||
|
6bd7262956 | ||
|
bff7a5f6ac | ||
|
6a30ca822b | ||
|
9e7ffdac88 | ||
|
400c117550 | ||
|
ad76ca4d4c | ||
|
5136c98a2f | ||
|
f5f72c49ec | ||
|
f8ff148f18 | ||
|
f75a976e04 | ||
|
8b135f0a25 | ||
|
430af17a2c | ||
|
ac98514a64 | ||
|
839272fa3a | ||
|
3f7e41039a | ||
|
b3062773f5 | ||
|
12a6c28236 | ||
|
16df5d8f6d | ||
|
269ffdc10b | ||
|
bb8b4e4972 | ||
|
28c34c93e5 | ||
|
c796532ce5 | ||
|
6684a6e9bb | ||
|
db0d821b08 | ||
|
ce5d10cf61 | ||
|
192fd2f9c3 | ||
|
a1c1188a52 | ||
|
cc8736d28d | ||
|
9e31d7dd7d | ||
|
d2347fa858 | ||
|
63e6e932d7 | ||
|
a49534372d | ||
|
ee20904695 | ||
|
979c94a42e | ||
|
708a38ba61 | ||
|
2e3afbabaf | ||
|
cc769c3d44 | ||
|
8ed58df419 | ||
|
34a277046d | ||
|
523769efa9 | ||
|
78bda0dce5 | ||
|
d1ee98d635 | ||
|
4b53d0e949 | ||
|
177eee41fb | ||
|
0dc8c9a01a | ||
|
2e40c5d979 | ||
|
2c8bb831fa | ||
|
11c86f82ec | ||
|
5beed1f49f | ||
|
338a2e11bc | ||
|
bc06ab77b4 | ||
|
31a55c3bc9 | ||
|
0bb1bc2091 | ||
|
1f6b86fa4b | ||
|
0957e8f99b | ||
|
3e574ed460 | ||
|
2e646e6ade | ||
|
640d44dbc6 | ||
|
94dd010461 | ||
|
7d23ad27b7 | ||
|
55f3bb578e | ||
|
f5201b70db | ||
|
bf725e3e8b | ||
|
f4b0280742 | ||
|
8532ad674a | ||
|
a11ad68d65 | ||
|
c0416597f5 | ||
|
aa3330b0d6 | ||
|
25cfe11f3d | ||
|
6dd89e3044 | ||
|
4288e26af9 | ||
|
75b540630f | ||
|
f14f1387ec | ||
|
8e03288604 | ||
|
35cd9d015e | ||
|
a848de7b31 | ||
|
1d408a6bad | ||
|
1862405783 | ||
|
e046298ce0 | ||
|
7c7ff554ce | ||
|
6cca56615f | ||
|
2dafbc455d | ||
|
07a1493141 | ||
|
a7912ec0d8 | ||
|
aeff5cde90 | ||
|
945207835e | ||
|
03ef976954 | ||
|
5a531e47b6 | ||
|
14a65baa2a | ||
|
fcee7ff4cb |
8
COPYING
8
COPYING
@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
@ -2,11 +2,15 @@
|
||||
|
||||
set -e +x
|
||||
|
||||
function fail {
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
USAGE="Usage: $0 dep old new"
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fail "$USAGE"
|
||||
fi
|
||||
|
||||
DEP=$1
|
||||
@ -16,15 +20,13 @@ NEW=$3
|
||||
CABALFILE=$(ls *.cabal)
|
||||
|
||||
if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
|
||||
echo "There needs to be one .cabal file in the current dir!"
|
||||
exit 1
|
||||
fail "There needs to be one .cabal file in the current dir!"
|
||||
fi
|
||||
|
||||
BREAK=[^[:alnum:]-]
|
||||
|
||||
if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then
|
||||
echo "$CABALFILE does not match: $DEP $OLD"
|
||||
exit 1
|
||||
fail "$CABALFILE does not match: $DEP $OLD"
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
|
@ -2,11 +2,15 @@
|
||||
|
||||
set -e +x
|
||||
|
||||
function fail {
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
USAGE="Usage: $0 dep"
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fail "$USAGE"
|
||||
fi
|
||||
|
||||
DEP=$1
|
||||
@ -14,8 +18,7 @@ DEP=$1
|
||||
CABALFILE=$(ls *.cabal)
|
||||
|
||||
if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
|
||||
echo "There needs to be one .cabal file in the current dir!"
|
||||
exit 1
|
||||
fail "There needs to be one .cabal file in the current dir!"
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
@ -23,8 +26,7 @@ if [ ! -f $CABALFILE.orig ]; then
|
||||
fi
|
||||
|
||||
if grep "$DEP" $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then
|
||||
echo "$0: deleting whole $DEP lines not safe - try more precise pattern"
|
||||
exit 1
|
||||
fail "$0: deleting whole $DEP lines not safe - try more precise pattern"
|
||||
fi
|
||||
|
||||
sed -i$BACKUP -e "/$DEP/d" $CABALFILE
|
||||
|
@ -5,11 +5,15 @@
|
||||
|
||||
set -e +x
|
||||
|
||||
function fail {
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
USAGE="Usage: $0 FLAG [True|False]"
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fail "$USAGE"
|
||||
fi
|
||||
|
||||
FLAG=$1
|
||||
@ -24,23 +28,19 @@ esac
|
||||
CABALFILE=$(ls *.cabal)
|
||||
|
||||
if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
|
||||
echo "There needs to be one .cabal file in the current dir!"
|
||||
exit 1
|
||||
fail "There needs to be one .cabal file in the current dir!"
|
||||
fi
|
||||
|
||||
if ! grep -q -i "^flag *$FLAG" $CABALFILE; then
|
||||
echo "$CABALFILE does not have flag $FLAG"
|
||||
exit 1
|
||||
fail "$CABALFILE does not have flag $FLAG"
|
||||
fi
|
||||
|
||||
if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default:"; then
|
||||
echo "$CABALFILE: $FLAG flag might not have a default"
|
||||
exit 1
|
||||
fail "$CABALFILE: $FLAG flag might not have a default"
|
||||
fi
|
||||
|
||||
if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default: *$OLD"; then
|
||||
echo "$CABALFILE: $FLAG flag already defaults to $NEW"
|
||||
exit 1
|
||||
fail "$CABALFILE: $FLAG flag already defaults to $NEW"
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
|
39
cabal-tweak-remove-upperbound
Executable file
39
cabal-tweak-remove-upperbound
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e +x
|
||||
|
||||
function fail {
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
USAGE="Usage: $0 dep"
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
fail "$USAGE"
|
||||
fi
|
||||
|
||||
DEP=$1
|
||||
CABALFILE=$(ls *.cabal)
|
||||
|
||||
if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
|
||||
fail "There needs to be one .cabal file in the current dir!"
|
||||
fi
|
||||
|
||||
BREAK=[^[:alnum:]-]
|
||||
|
||||
if ! grep -q "$BREAK$DEP$BREAK[^,]*" $CABALFILE; then
|
||||
fail "$CABALFILE does not match: $DEP"
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
BACKUP=.orig
|
||||
fi
|
||||
|
||||
if grep -q "$BREAK$DEP$BREAK[^,]*&&" $CABALFILE; then
|
||||
sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^&,]*[^ ]\+\) *&&[^,]*/\1/g" $CABALFILE
|
||||
fi
|
||||
|
||||
if grep -q "$BREAK$DEP$BREAK[^,]*==" $CABALFILE; then
|
||||
sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^=,]*\)==\([^,*]*\)\.\*/\1>=\2/g" $CABALFILE
|
||||
fi
|
60
ghc-deps.sh
60
ghc-deps.sh
@ -1,43 +1,71 @@
|
||||
#!/bin/sh
|
||||
# find rpm provides and requires for Haskell GHC libraries
|
||||
|
||||
[ $# -ne 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1
|
||||
[ $# -lt 3 ] && echo "Usage: $(basename "$0") [--provides|--requires] %{buildroot} %{ghclibdir} [ghc-version]" && exit 1
|
||||
|
||||
set +x
|
||||
set +x -e
|
||||
|
||||
mode=$1
|
||||
pkgbasedir=$2
|
||||
pkgconfdir=$pkgbasedir/package.conf.d
|
||||
MODE=$1
|
||||
BUILDROOT=$2
|
||||
PKGBASEDIR=$3
|
||||
if [ -z "$4" ];
|
||||
then GHCPREFIX=ghc
|
||||
else GHCPREFIX=$4
|
||||
fi
|
||||
if [ -d "$BUILDROOT$PKGBASEDIR/lib" ];
|
||||
then PKGBASELIB=$PKGBASEDIR/lib
|
||||
else PKGBASELIB=$PKGBASEDIR
|
||||
fi
|
||||
PKGCONFDIR=$PKGBASELIB/package.conf.d
|
||||
|
||||
ghc_pkg="/usr/lib/rpm/ghc-pkg-wrapper $pkgbasedir"
|
||||
GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $BUILDROOT$PKGBASEDIR"
|
||||
|
||||
case $mode in
|
||||
case $MODE in
|
||||
--provides) field=id ;;
|
||||
--requires) field=depends ;;
|
||||
*) echo "$(basename $0): Need --provides or --requires"
|
||||
*) echo "$(basename "$0"): Need --provides or --requires"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//)
|
||||
|
||||
files=$(cat)
|
||||
|
||||
(
|
||||
for i in $files; do
|
||||
case $i in
|
||||
# exclude builtin_rts.conf
|
||||
$pkgconfdir/*-*.conf)
|
||||
name=$(grep "^name: " $i | sed -e "s/name: //")
|
||||
ids=$($ghc_pkg field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
|
||||
|
||||
# exclude rts.conf
|
||||
$BUILDROOT$PKGCONFDIR/*-*.conf)
|
||||
name=$(grep "^name: " "$i" | sed -e "s/name: *//")
|
||||
ids=$($GHC_PKG field "$name" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /")
|
||||
for d in $ids; do
|
||||
case $d in
|
||||
*-*) echo "ghc-devel($d)" ;;
|
||||
*-*-internal) ;;
|
||||
*-*) echo "$GHCPREFIX-devel($d)" ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
*/libHS*_p.a)
|
||||
pkgver=$(basename "$(dirname "$i")")
|
||||
ids=$($GHC_PKG field "$pkgver" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//")
|
||||
for d in $ids; do
|
||||
case $d in
|
||||
*-*-internal) ;;
|
||||
*-*)
|
||||
case $field in
|
||||
id)
|
||||
echo "$GHCPREFIX-prof($d)"
|
||||
;;
|
||||
*)
|
||||
if [ -f "$PKGBASELIB"/*/libHS"${d}"_p.a -o -f "$BUILDROOT$PKGBASELIB"/*/libHS"${d}"_p.a -o -f "$PKGBASELIB"/*/*/libHS"${d}"_p.a -o -f "$BUILDROOT$PKGBASELIB"/*/*/libHS"${d}"_p.a ]; then
|
||||
echo "$GHCPREFIX-prof($d)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
) | sort | uniq
|
||||
|
@ -2,30 +2,21 @@
|
||||
|
||||
[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1
|
||||
|
||||
set +x
|
||||
set +x -e
|
||||
|
||||
PKGBASEDIR=$1
|
||||
shift
|
||||
PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
||||
GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
||||
|
||||
if [ -d $PKGBASEDIR/lib ];
|
||||
then PKGCONFDIR=$PKGBASEDIR/lib/package.conf.d
|
||||
else PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
||||
fi
|
||||
|
||||
# for a ghc build use the new ghc-pkg
|
||||
INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER
|
||||
|
||||
if [ -x "$INPLACE_GHCPKG" ]; then
|
||||
case $GHC_VER in
|
||||
7.4.*)
|
||||
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
|
||||
;;
|
||||
7.6.*)
|
||||
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR"
|
||||
;;
|
||||
# 7.8 and 7.10
|
||||
*)
|
||||
if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then
|
||||
GHC_PKG="env LD_LIBRARY_PATH=$(dirname $PKGBASEDIR) $PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
||||
GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR"
|
||||
fi
|
||||
|
||||
|
@ -6,17 +6,14 @@
|
||||
%global macros_dir %{_sysconfdir}/rpm
|
||||
%endif
|
||||
|
||||
# uncomment to bootstrap without hscolour
|
||||
#%%global without_hscolour 1
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 1.9.6
|
||||
Release: 1%{?dist}
|
||||
Version: 2.5.2
|
||||
Release: 3%{?dist}
|
||||
Summary: RPM macros for building Haskell packages for GHC
|
||||
|
||||
License: GPLv3+
|
||||
URL: https://github.com/fedora-haskell/ghc-rpm-macros
|
||||
# Currently source is only in git but tarballs could be made if it helps
|
||||
# Currently source is only in pkg git but tarballs could be made if it helps
|
||||
URL: https://src.fedoraproject.org/rpms/ghc-rpm-macros/
|
||||
Source0: macros.ghc
|
||||
Source1: COPYING
|
||||
Source2: AUTHORS
|
||||
@ -29,84 +26,102 @@ Source8: ghc-pkg-wrapper
|
||||
Source9: macros.ghc-os
|
||||
Source10: Setup.hs
|
||||
Source11: cabal-tweak-drop-dep
|
||||
Source12: cabal-tweak-remove-upperbound
|
||||
Requires: redhat-rpm-config
|
||||
# for ghc_version
|
||||
Requires: ghc-compiler
|
||||
%if %{undefined without_hscolour}
|
||||
Requires: hscolour
|
||||
%endif
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
|
||||
# ghc_version needs ghc-compiler or ghcX.Y-compiler-default
|
||||
Requires: chrpath
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description
|
||||
A set of macros for building GHC packages following the Haskell Guidelines
|
||||
of the Fedora Haskell SIG. ghc needs to be installed in order to make use of
|
||||
these macros.
|
||||
of the Fedora Haskell SIG.
|
||||
|
||||
|
||||
%package extra
|
||||
Summary: Extra RPM macros for building Haskell library subpackages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: chrpath
|
||||
|
||||
%description extra
|
||||
Extra macros used for subpackaging of Haskell libraries,
|
||||
for example in ghc and haskell-platform.
|
||||
|
||||
|
||||
%if 0%{?fedora} < 37
|
||||
%package -n ghc-filesystem
|
||||
Summary: Shared directories for Haskell documentation
|
||||
|
||||
%description -n ghc-filesystem
|
||||
This package provides some common directories used for
|
||||
Haskell libraries documentation.
|
||||
%endif
|
||||
|
||||
|
||||
# ideally packages should be obsoleted by some relevant package
|
||||
# this is a last resort when there is no such appropriate package
|
||||
%package -n ghc-obsoletes
|
||||
Summary: Dummy package to obsolete deprecated Haskell packages
|
||||
%if 0%{?fedora} >= 22
|
||||
# these 3 no longer build with ghc-7.8
|
||||
Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2
|
||||
Obsoletes: ghc-parameterized-data < 0.1.6
|
||||
Obsoletes: ghc-parameterized-data-devel < 0.1.6
|
||||
Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5
|
||||
Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14
|
||||
# dropped from HP 2014.2
|
||||
Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8
|
||||
%endif
|
||||
%if 0%{?fedora} >= 24
|
||||
Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3
|
||||
Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6
|
||||
Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4
|
||||
%endif
|
||||
%if 0%{?fedora} >= 25
|
||||
Obsoletes: ghc-cmdtheline <= 0.2.3, ghc-cmdtheline-devel <= 0.2.3
|
||||
Obsoletes: ghc-concrete-typerep <= 0.1.0.2, ghc-concrete-typerep-devel <= 0.1.0.2
|
||||
Obsoletes: ghc-glade <= 0.12.5.0, ghc-glade-devel <= 0.12.5.0
|
||||
Obsoletes: bluetile <= 0.6, bluetile-core <= 0.6
|
||||
Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2
|
||||
Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3
|
||||
Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2
|
||||
Obsoletes: idris <= 0.9.9.1
|
||||
Obsoletes: ghc-editline < 0.2.1.1-13, ghc-editline-devel < 0.2.1.1-13
|
||||
Obsoletes: ghc-hashed-storage < 0.5.11-4, ghc-hashed-storage-devel < 0.5.11-4
|
||||
Obsoletes: ghc-nats <= 0.2, ghc-nats-devel <= 0.2
|
||||
Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11
|
||||
%endif
|
||||
%if 0%{?fedora} >= 26
|
||||
Obsoletes: ghc-geniplate <= 0.6.0.5, ghc-geniplate-devel <= 0.6.0.5
|
||||
Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0
|
||||
# dropped from HP 8.0.2
|
||||
Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5
|
||||
Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5
|
||||
%endif
|
||||
%if 0%{?fedora} >= 27
|
||||
Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1
|
||||
%endif
|
||||
%if 0%{?fedora} >= 28
|
||||
Obsoletes: ghc-fail < 4.9.0.0-2, ghc-fail-devel < 4.9.0.0-2
|
||||
Obsoletes: ghc-ltk < 0.16, ghc-ltk-devel < 0.16
|
||||
%endif
|
||||
%if 0%{?fedora} >= 29
|
||||
Obsoletes: ghc-content-store < 0.2.1-3, ghc-content-store-devel < 0.2.1-3
|
||||
Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3
|
||||
Obsoletes: ghc-bdcs-api < 0.1.3-3, ghc-bdcs-api-devel < 0.1.3-3
|
||||
%endif
|
||||
%if 0%{?fedora} >= 30
|
||||
# ghc
|
||||
Obsoletes: ghc-hoopl < 3.10.2.2-74, ghc-hoopl-devel < 3.10.2.2-74
|
||||
# language-ecmascript
|
||||
Obsoletes: ghc-tagshare < 0.0-10, ghc-tagshare-devel < 0.0-10
|
||||
Obsoletes: ghc-testing-feat < 0.4.0.3-10, ghc-testing-feat-devel < 0.4.0.3-10
|
||||
# enumerator
|
||||
Obsoletes: ghc-enumerator < 0.4.20-12, ghc-enumerator-devel < 0.4.20-12
|
||||
Obsoletes: ghc-attoparsec-enumerator < 0.3.4-10, ghc-attoparsec-enumerator-devel < 0.3.4-10
|
||||
Obsoletes: ghc-blaze-builder-enumerator < 0.2.1.0-8, ghc-blaze-builder-enumerator-devel < 0.2.1.0-8
|
||||
Obsoletes: ghc-zlib-enum < 0.2.3.1-12, ghc-zlib-enum-devel < 0.2.3.1-12
|
||||
# Agda
|
||||
Obsoletes: ghc-monadplus < 1.4.2-17, ghc-monadplus-devel < 1.4.2-17
|
||||
# conduit-combinators
|
||||
Obsoletes: ghc-conduit-combinators < 1.3.1
|
||||
%endif
|
||||
%if 0%{?fedora} >= 31
|
||||
# base package obsoleted above in f30
|
||||
Obsoletes: ghc-conduit-combinators-devel < 1.3.1
|
||||
%endif
|
||||
%if 0%{?fedora} >= 32
|
||||
Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5
|
||||
Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17
|
||||
%endif
|
||||
%if 0%{?fedora} >= 33
|
||||
Obsoletes: ghc-easytest < 0.2.1-4, ghc-easytest-devel < 0.2.1-4, ghc-easytest-prof < 0.2.1-4,
|
||||
Obsoletes: ghc-EdisonAPI < 1.3.1-23, ghc-EdisonAPI-devel < 1.3.1-23, ghc-EdisonAPI-prof < 1.3.1-23
|
||||
Obsoletes: ghc-EdisonCore < 1.3.2.1-23, ghc-EdisonCore-devel < 1.3.2.1-23, ghc-EdisonCore-prof < 1.3.2.1-23
|
||||
Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14
|
||||
%endif
|
||||
Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16
|
||||
%if 0%{?fedora} >= 35
|
||||
Obsoletes: pandoc-citeproc < 0.18, ghc-pandoc-citeproc < 0.18, ghc-pandoc-citeproc-devel < 0.18, ghc-pandoc-citeproc-doc < 0.18, ghc-pandoc-citeproc-prof < 0.18, pandoc-citeproc-common < 0.18
|
||||
Obsoletes: ghc-base-noprelude < 4.13.0.1, ghc-base-noprelude-devel < 4.13.0.1, ghc-base-noprelude-doc < 4.13.0.1, ghc-base-noprelude-prof < 4.13.0.1
|
||||
Obsoletes: ghc-HsYAML-aeson < 0.2.0.1, ghc-HsYAML-aeson-devel < 0.2.0.1, ghc-HsYAML-aeson-doc < 0.2.0.1, ghc-HsYAML-aeson-prof < 0.2.0.1
|
||||
Obsoletes: ghc-chalmers-lava2000 < 1.6.2, ghc-chalmers-lava2000-devel < 1.6.2, ghc-chalmers-lava2000-doc < 1.6.2, ghc-chalmers-lava2000-prof < 1.6.2
|
||||
Obsoletes: ghc-codec-rpm < 0.2.3, ghc-codec-rpm-devel < 0.2.3, ghc-codec-rpm-doc < 0.2.3, ghc-codec-rpm-prof < 0.2.3
|
||||
Obsoletes: ghc-cpio-conduit < 0.7.1, ghc-cpio-conduit-devel < 0.7.1, ghc-cpio-conduit-doc < 0.7.1, ghc-cpio-conduit-prof < 0.7.1
|
||||
Obsoletes: ghc-failure < 0.2.0.4, ghc-failure-devel < 0.2.0.4, ghc-failure-doc < 0.2.0.4, ghc-failure-prof < 0.2.0.4
|
||||
Obsoletes: ghc-attempt < 0.4.0.2, ghc-attempt-devel < 0.4.0.2, ghc-attempt-doc < 0.4.0.2, ghc-attempt-prof < 0.4.0.2
|
||||
%endif
|
||||
%if 0%{?fedora} >= 36
|
||||
Obsoletes: ghc-regex-applicative-text < 0.1.0.1-16, ghc-regex-applicative-text-devel < 0.1.0.1-16, ghc-regex-applicative-text-doc < 0.1.0.1-16, ghc-regex-applicative-text-prof < 0.1.0.1-16
|
||||
%endif
|
||||
%if 0%{?fedora} >= 38
|
||||
Obsoletes: ghc-bytestring-show < 0.3.5.7, ghc-bytestring-show-devel < 0.3.5.7, ghc-bytestring-show-doc < 0.3.5.7, ghc-bytestring-show-prof < 0.3.5.7
|
||||
Obsoletes: ghc-djinn-ghc < 0.1, ghc-djinn-ghc-devel < 0.1, ghc-djinn-ghc-doc < 0.1, ghc-djinn-ghc-prof < 0.1
|
||||
Obsoletes: ghc-ghc-mtl < 1.2.2, ghc-ghc-mtl-devel < 1.2.2, ghc-ghc-mtl-doc < 1.2.2, ghc-ghc-mtl-prof < 1.2.2
|
||||
Obsoletes: ghc-ghc-syb-utils < 0.3.1, ghc-ghc-syb-utils-devel < 0.3.1, ghc-ghc-syb-utils-doc < 0.3.1, ghc-ghc-syb-utils-prof < 0.3.1
|
||||
Obsoletes: ghc-cabal-helper < 1.2, ghc-cabal-helper-devel < 1.2, ghc-cabal-helper-doc < 1.2, ghc-cabal-helper-prof < 1.2
|
||||
Obsoletes: ghc-cabal-plan < 0.8, ghc-cabal-plan-devel < 0.8, ghc-cabal-plan-doc < 0.8, ghc-cabal-plan-prof < 0.8
|
||||
Obsoletes: ghc-optics-core < 0.4, ghc-optics-core-devel < 0.4, ghc-optics-core-doc < 0.4, ghc-optics-core-prof < 0.4
|
||||
Obsoletes: ghc-semialign < 1.2, ghc-semialign-devel < 1.2, ghc-semialign-doc < 1.2, ghc-semialign-prof < 1.2
|
||||
Obsoletes: ghc-topograph < 1.0.0.2, ghc-topograph-devel < 1.0.0.2, ghc-topograph-doc < 1.0.0.2, ghc-topograph-prof < 1.0.0.2
|
||||
Obsoletes: ghc-indexed-profunctors < 0.1.1-18, ghc-indexed-profunctors-devel < 0.1.1-18, ghc-indexed-profunctors-doc < 0.1.1-18, ghc-indexed-profunctors-prof < 0.1.1-18
|
||||
Obsoletes: ghc-regex-compat-tdfa < 0.95.1.4-38, ghc-regex-compat-tdfa-devel < 0.95.1.4-38, ghc-regex-compat-tdfa-doc < 0.95.1.4-38, ghc-regex-compat-tdfa-prof < 0.95.1.4-38
|
||||
%endif
|
||||
|
||||
%description -n ghc-obsoletes
|
||||
Meta package for obsoleting deprecated Haskell packages.
|
||||
@ -120,32 +135,34 @@ cp %{SOURCE1} %{SOURCE2} .
|
||||
|
||||
|
||||
%build
|
||||
echo no build stage needed
|
||||
echo no build stage
|
||||
|
||||
|
||||
%install
|
||||
install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc
|
||||
install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra
|
||||
install -p -D -m 0644 %{SOURCE9} %{buildroot}/%{macros_dir}/macros.ghc-os
|
||||
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{macros_dir}/macros.ghc
|
||||
install -p -D -m 0644 %{SOURCE6} %{buildroot}%{macros_dir}/macros.ghc-extra
|
||||
install -p -D -m 0644 %{SOURCE9} %{buildroot}%{macros_dir}/macros.ghc-os
|
||||
|
||||
install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr
|
||||
%if 0%{?fedora} < 38
|
||||
echo -e "\n%%_ghcdynlibdir %%{_libdir}" >> %{buildroot}%{macros_dir}/macros.ghc-os
|
||||
%endif
|
||||
|
||||
install -p -D -m 0644 %{SOURCE10} %{buildroot}/%{_datadir}/%{name}/Setup.hs
|
||||
install -p -D -m 0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
|
||||
install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver
|
||||
install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
|
||||
install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep
|
||||
install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
install -p -D -m 0644 %{SOURCE7} %{buildroot}%{_prefix}/lib/rpm/fileattrs/ghc.attr
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <<EOF
|
||||
install -p -D -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/Setup.hs
|
||||
|
||||
echo \$files | tr [:blank:] '\n' | %{_rpmconfigdir}/rpmdeps --requires
|
||||
EOF
|
||||
install -p -D -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/cabal-tweak-dep-ver
|
||||
install -p -D -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/cabal-tweak-flag
|
||||
install -p -D -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/cabal-tweak-drop-dep
|
||||
install -p -D -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/cabal-tweak-remove-upperbound
|
||||
install -p -D -m 0755 %{SOURCE8} %{buildroot}%{_prefix}/lib/rpm/ghc-pkg-wrapper
|
||||
|
||||
%if 0%{?fedora} < 37
|
||||
mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
|
||||
%endif
|
||||
|
||||
|
||||
@ -162,6 +179,7 @@ EOF
|
||||
%{_bindir}/cabal-tweak-dep-ver
|
||||
%{_bindir}/cabal-tweak-drop-dep
|
||||
%{_bindir}/cabal-tweak-flag
|
||||
%{_bindir}/cabal-tweak-remove-upperbound
|
||||
%{_datadir}/%{name}/Setup.hs
|
||||
|
||||
|
||||
@ -169,12 +187,297 @@ EOF
|
||||
%{macros_dir}/macros.ghc-extra
|
||||
|
||||
|
||||
%if 0%{?fedora} >= 22
|
||||
%if 0%{?fedora} < 37
|
||||
%files -n ghc-filesystem
|
||||
%dir %{_docdir}/ghc
|
||||
# %%{ghc_html_dir}
|
||||
%dir %{_docdir}/ghc/html
|
||||
# %%{ghc_html_libraries_dir}
|
||||
%dir %{_docdir}/ghc/html/libraries
|
||||
%endif
|
||||
|
||||
|
||||
%if 0%{?fedora} >= 29
|
||||
%files -n ghc-obsoletes
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Mar 27 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-3
|
||||
- f38: also obsolete regex-compat-tdfa
|
||||
|
||||
* Sun Mar 26 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-2
|
||||
- add obsoletes for F38
|
||||
|
||||
* Wed Feb 15 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-1
|
||||
- ghc-dep.sh: check for *_p.a under Hadrian platform subdir as well
|
||||
- ghc.attr: include Hadrian lib/ subdir in .conf regex
|
||||
|
||||
* Sat Feb 11 2023 Jens Petersen <petersen@redhat.com> - 2.5.1-1
|
||||
- add ghc_merge_filelist
|
||||
|
||||
* Sun Jan 29 2023 Jens Petersen <petersen@redhat.com> - 2.5.0-1
|
||||
- define ghc_smp_mflags to speed up package builds
|
||||
- ghc_configure and ghc_version now respect ghc_name for ghcX.Y (via rpmquery)
|
||||
- base ghc_version on compiler subpackage
|
||||
- ghc_gen_filelists: error if no .so file and not -m metapkg
|
||||
- use ghc upstream paths for libHS*.so unless using _ghcdynlibdir
|
||||
- F38: disable _ghcdynlibdir as default
|
||||
- ghc_bin_build -W to ignore ghc_name version in cabal_configure
|
||||
- ghc_lib_subpackage: with ghc_obsoletes_name obsolete ghc{ghc_major}-*
|
||||
- handle hadrian lib/ subdir consistently for packages
|
||||
- move with_ghc_prof to ghc-srpm-macros
|
||||
- cabal_configure: non-core shared libs go to ghcliblib
|
||||
- ghc_delete_rpaths: need to remove local RPATH for subpackaged libs
|
||||
|
||||
* Sat Aug 6 2022 Jens Petersen <petersen@redhat.com> - 2.4.4-2
|
||||
- F36 obsoletes regex-applicative-text
|
||||
|
||||
* Tue Jul 26 2022 Jens Petersen <petersen@redhat.com> - 2.4.4-1
|
||||
- ghc_gen_filelists: check pkg licensedir exists
|
||||
- in 9.4.1 Hadrian html docdirs are versioned again (breaks older Hadrian)
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Jul 19 2022 Jens Petersen <petersen@redhat.com> - 2.4.3-1
|
||||
- in F37 ghc-filesystem is now a subpackage of ghc
|
||||
|
||||
* Tue Jul 19 2022 Jens Petersen <petersen@redhat.com> - 2.4.2-1
|
||||
- ghc_bin_build,ghc_lib_build: define ghc_debuginfo to really enable debuginfo
|
||||
|
||||
* Sun Jul 17 2022 Jens Petersen <petersen@redhat.com> - 2.4.1-1
|
||||
- ghc_bin_build,ghc_lib_build: use ghc_debuginfo to enable debuginfo
|
||||
|
||||
* Fri Jun 10 2022 Jens Petersen <petersen@redhat.com> - 2.4.0-1
|
||||
- change ghc-deps.sh, splitting buildroot path from ghclibdir
|
||||
so that the ghc version can be used more precisely
|
||||
|
||||
* Wed Jun 8 2022 Jens Petersen <petersen@redhat.com> - 2.3.16-1
|
||||
- define ghc_prefix (used for ghcX.Y packaging)
|
||||
- add _ghc_doc_dir
|
||||
|
||||
* Wed Apr 27 2022 Jens Petersen <petersen@redhat.com> - 2.3.15-2
|
||||
- drop ghc-compiler requires to allow using ghcX.Y-compiler-default
|
||||
|
||||
* Wed Apr 27 2022 Tim Landscheidt <tim@tim-landscheidt.de>
|
||||
- Update license from https://www.gnu.org/licenses/
|
||||
- Use https for subpackage URLs
|
||||
|
||||
* Thu Mar 10 2022 Jens Petersen <petersen@redhat.com> - 2.3.15-1
|
||||
- ghc_set_gcc_flags: disable brp-strip-lto to avoid strip timestamp warnings
|
||||
|
||||
* Sat Feb 12 2022 Jens Petersen <petersen@redhat.com> - 2.3.14-1
|
||||
- ghc_set_gcc_flags: also sed CFLAGS when preset in F36
|
||||
because of https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck
|
||||
|
||||
* Tue Feb 8 2022 Jens Petersen <petersen@redhat.com> - 2.3.13-1
|
||||
- ghc_set_gcc_flags: disable _lto_cflags for all archs
|
||||
to address missing symbol linking errors across packages
|
||||
(particularly those using FFI)
|
||||
|
||||
* Fri Jan 21 2022 Jens Petersen <petersen@redhat.com> - 2.3.12-1
|
||||
- disable package notes which broke all Haskell package builds (#2043092)
|
||||
https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.11-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jan 5 2022 Jens Petersen <petersen@redhat.com> - 2.3.11-1
|
||||
- ghc-deps.sh: fix the rts deps erasure cleanly
|
||||
|
||||
* Wed Dec 29 2021 Jens Petersen <petersen@redhat.com> - 2.3.10-1
|
||||
- ghc_html_dir: use ghc_name for ghcX.Y docs
|
||||
|
||||
* Mon Dec 20 2021 Jens Petersen <petersen@redhat.com> - 2.3.9-1
|
||||
- ghc-deps.sh: only exclude unversioned rts.conf
|
||||
|
||||
* Mon Dec 20 2021 Jens Petersen <petersen@redhat.com> - 2.3.8-1
|
||||
- _arch fits Cabal better for ghclibplatform
|
||||
|
||||
* Mon Dec 20 2021 Jens Petersen <petersen@redhat.com> - 2.3.7-1
|
||||
- ghclibplatform: Cabal uses i386 for i686
|
||||
|
||||
* Mon Dec 20 2021 Jens Petersen <petersen@redhat.com> - 2.3.6-1
|
||||
- fix missing Hadrian ghc dependency generation
|
||||
|
||||
* Sun Dec 19 2021 Jens Petersen <petersen@redhat.com> - 2.3.5-1
|
||||
- Hadrian haddock dirs are not versioned
|
||||
|
||||
* Sun Dec 19 2021 Jens Petersen <petersen@redhat.com> - 2.3.4-1
|
||||
- move Cabal_arch into ghclibplatform macro
|
||||
|
||||
* Sun Dec 19 2021 Jens Petersen <petersen@redhat.com> - 2.3.3-1
|
||||
- fixup ghc_arch renaming it to Cabal_arch
|
||||
|
||||
* Sat Dec 18 2021 Jens Petersen <petersen@redhat.com> - 2.3.2-1
|
||||
- define ghcliblib and ghclibplatform globally
|
||||
- fix ghc-deps.sh dependency generation for Hadrian
|
||||
- Cabal uses ppc64 in paths for ppc64le
|
||||
|
||||
* Fri Dec 17 2021 Jens Petersen <petersen@redhat.com> - 2.3.1-1
|
||||
- ghc_gen_filelists: support ghc Hadrian install
|
||||
|
||||
* Wed Dec 8 2021 Jens Petersen <petersen@redhat.com> - 2.3.0-1
|
||||
- support fileattrs dependency generation for ghc9.2
|
||||
- drop dependency generation for rhel6
|
||||
|
||||
* Thu Sep 9 2021 Jens Petersen <petersen@redhat.com> - 2.2.4-1
|
||||
- cabal_configure: add -fhide-source-paths to ghc-options
|
||||
(works for ghc-8.2 and above)
|
||||
|
||||
* Mon Aug 23 2021 Jens Petersen <petersen@redhat.com> - 2.2.3-6
|
||||
- F35 obsoletes for attempt
|
||||
|
||||
* Mon Aug 23 2021 Jens Petersen <petersen@redhat.com> - 2.2.3-5
|
||||
- add F35 obsoletes for base-noprelude and failure
|
||||
|
||||
* Tue Aug 17 2021 Jens Petersen <petersen@redhat.com> - 2.2.3-4
|
||||
- F35 obsoletes for pandoc-citeproc, HsYAML-aeson, chalmers-lava2000,
|
||||
cpio-conduit, and codec-rpm
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jul 14 2021 Jens Petersen <petersen@redhat.com> - 2.2.3-2
|
||||
- drop obsoletes for haskell-platform GL graphics libraries
|
||||
which have been packaged and cabal-plan
|
||||
|
||||
* Sat Jul 10 2021 Jens Petersen <petersen@redhat.com> - 2.2.3-1
|
||||
- fix ghc_fix_doc_perms only to touch files not dirs
|
||||
|
||||
* Thu Jun 17 2021 Jens Petersen <petersen@redhat.com> - 2.2.2-2
|
||||
- haddock has not used hscolour for a long time
|
||||
|
||||
* Tue Jun 8 2021 Jens Petersen <petersen@redhat.com> - 2.2.2-1
|
||||
- restore ghc_fix_rpath for now for backward compatibility
|
||||
and drop it from ghc_libs_install
|
||||
|
||||
* Tue Jun 8 2021 Jens Petersen <petersen@redhat.com> - 2.2.1-1
|
||||
- ghc-rpm-macros needs to require chrpath now instead of ghc-rpm-macros-extra
|
||||
|
||||
* Mon Jun 7 2021 Jens Petersen <petersen@redhat.com> - 2.2.0-1
|
||||
- ghc_delete_rpaths macro replaces ghc_fix_rpath(), needed for
|
||||
https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
|
||||
|
||||
* Wed Mar 24 2021 Jens Petersen <petersen@redhat.com> - 2.1.0-1
|
||||
- add ghc-filesystem subpackage to own /usr/share/doc/ghc/{,html/{,libraries/}}
|
||||
(#1926757)
|
||||
- drop obsoletes from before f29
|
||||
- update url
|
||||
- fix ghc_fix_doc_perms grep regexp quoting
|
||||
|
||||
* Sat Jan 30 2021 Jens Petersen <petersen@redhat.com> - 2.0.15-1
|
||||
- add ghc_fix_doc_perms and use it in ghc_bin_build and ghc_lib_build
|
||||
- ghc_lib_subpackage: define ghc_subpackages_list
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Aug 29 2020 Jens Petersen <petersen@redhat.com> - 2.0.14-1
|
||||
- ghc-deps.sh: be careful when filtering out rts (#1873687)
|
||||
|
||||
* Wed Aug 26 2020 Jens Petersen <petersen@redhat.com> - 2.0.13-2
|
||||
- obsolete ghc-iwlib (xmobar)
|
||||
|
||||
* Tue Aug 4 2020 Jens Petersen <petersen@redhat.com> - 2.0.13-1
|
||||
- disable LTO on (unregisterised) s390x (#1863601)
|
||||
to prevent linker warning flood for prof libraries
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2020 Jens Petersen <petersen@redhat.com> - 2.0.12-2
|
||||
- obsoletes for ghc-EdisonAPI, ghc-EdisonCore, ghc-easytest
|
||||
|
||||
* Tue Jul 21 2020 Jens Petersen <petersen@redhat.com> - 2.0.12-1
|
||||
- make doc packages noarch for subpackaging
|
||||
- obsoletes for ghc-gtksourceview2
|
||||
|
||||
* Wed Jun 24 2020 Jens Petersen <petersen@redhat.com> - 2.0.11-1
|
||||
- handle meta subpackages:
|
||||
- ghc_lib_subpackage -m
|
||||
- only add dynlib to file-list if it exists
|
||||
|
||||
* Thu Jun 18 2020 Jens Petersen <petersen@redhat.com> - 2.0.10-1
|
||||
- cabal-tweak script now output errors to stderr
|
||||
|
||||
* Thu Jun 4 2020 Jens Petersen <petersen@redhat.com> - 2.0.9-1
|
||||
- doc subpackages should own /usr/share/doc/ghc/, /usr/share/doc/ghc/html/,
|
||||
and /usr/share/doc/ghc/html/libraries/ (#1795526)
|
||||
|
||||
* Sun May 10 2020 Jens Petersen <petersen@redhat.com> - 2.0.8-1
|
||||
- ghc-deps.sh: ignore internal libraries (#1822444)
|
||||
|
||||
* Fri May 8 2020 Jens Petersen <petersen@redhat.com> - 2.0.7-2
|
||||
- obsolete ghc-here (dropped from hledger)
|
||||
|
||||
* Mon Apr 27 2020 Jens Petersen <petersen@redhat.com> - 2.0.7-1
|
||||
- use -package Cabal to build Setup
|
||||
|
||||
* Tue Mar 3 2020 Jens Petersen <petersen@redhat.com> - 2.0.6-2
|
||||
- obsolete ghc-cabal-helper, ghc-cabal-plan, ghc-derive
|
||||
- unobsolete ghc-hgettext
|
||||
|
||||
* Mon Feb 10 2020 Jens Petersen <petersen@redhat.com> - 2.0.6-1
|
||||
- ghc-deps.sh: fix prof deps for subpackages
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Jan 27 2020 Jens Petersen <petersen@redhat.com> - 2.0.5-4
|
||||
- obsolete ghc-hgettext
|
||||
|
||||
* Fri Sep 27 2019 Jens Petersen <petersen@redhat.com> - 2.0.5-3
|
||||
- ghc_devel_prof macro not available early enough in koji
|
||||
|
||||
* Fri Sep 27 2019 Jens Petersen <petersen@redhat.com> - 2.0.5-2
|
||||
- define ghc_devel_prof
|
||||
|
||||
* Tue Aug 27 2019 Jens Petersen <petersen@redhat.com> - 2.0.5-1
|
||||
- ghc-deps.sh: fix generation of prof deps
|
||||
|
||||
* Tue Aug 13 2019 Jens Petersen <petersen@redhat.com> - 2.0.4-1
|
||||
- add cabal-tweak-remove-upperbound script
|
||||
|
||||
* Sat Aug 10 2019 Jens Petersen <petersen@redhat.com> - 2.0.3-1
|
||||
- only depend on ghc-prof(pkgid) if libHSpkgid_p.a exists
|
||||
|
||||
* Tue Aug 6 2019 Jens Petersen <petersen@redhat.com> - 2.0.2-1
|
||||
- check if doc haddock dir exists
|
||||
|
||||
* Mon Aug 5 2019 Jens Petersen <petersen@redhat.com> - 2.0.1-1
|
||||
- ghc_lib_subpackage: provide static with isa suffix
|
||||
|
||||
* Wed Jul 31 2019 Jens Petersen <petersen@redhat.com> - 2.0-1
|
||||
- bring back doc and prof subpackages
|
||||
- ghc_lib_subpackage: provide static
|
||||
|
||||
* Fri Jul 26 2019 Jens Petersen <petersen@redhat.com> - 1.10.0-1
|
||||
- drop devel subpackage scriplets (replaced by ghc-compiler triggers)
|
||||
- remove deprecated ghc_fix_dynamic_rpath
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.9-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat May 18 2019 Jens Petersen <petersen@redhat.com> - 1.9.9-3
|
||||
- ghc-conduit-combinators base package obsoleted in f30
|
||||
|
||||
* Fri May 10 2019 Jens Petersen <petersen@redhat.com> - 1.9.9-2
|
||||
- obsoletes for f30 deprecated packages
|
||||
(including haskell-platform subpackaged libraries and enumerator)
|
||||
|
||||
* Mon Apr 15 2019 Jens Petersen <petersen@redhat.com> - 1.9.9-1
|
||||
- cabal_configure: re-enable stripping by Cabal
|
||||
(remove --disable-executable-stripping --disable-library-stripping)
|
||||
- obsolete hoopl
|
||||
|
||||
* Tue Apr 9 2019 Jens Petersen <petersen@redhat.com> - 1.9.8-1
|
||||
- re-instate ghc_without_shared since useful for standalone builds
|
||||
|
||||
* Sun Feb 24 2019 Jens Petersen <petersen@redhat.com> - 1.9.7-1
|
||||
- ghc_fix_rpath was a noop when ghc_without_dynamic
|
||||
|
||||
* Fri Feb 1 2019 Jens Petersen <petersen@redhat.com> - 1.9.6-1
|
||||
- disable debuginfo by undefining _enable_debug_packages
|
||||
- leave stripping to generic rpm macros
|
||||
@ -1183,4 +1486,3 @@ EOF
|
||||
|
||||
* Mon May 4 2009 Yaakov M. Nemoy <ghc@hexago.nl> - 0.1-1
|
||||
- creation of package
|
||||
|
||||
|
6
ghc.attr
6
ghc.attr
@ -1,3 +1,3 @@
|
||||
%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||
%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||
%__ghc_path ^%{ghclibdir}/package.conf.d/.*\.conf$
|
||||
%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot} %{ghclibdir} %{?ghc_name:ghc-%{ghc_version}}
|
||||
%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot} %{ghclibdir} %{?ghc_name:ghc-%{ghc_version}}
|
||||
%__ghc_path ^(%{ghcliblib}/(lib/)?package.conf.d/.*\.conf|%{ghclibplatform}/.*/libHS.*\_p.a)$
|
||||
|
334
macros.ghc
334
macros.ghc
@ -2,22 +2,88 @@
|
||||
# see https://fedoraproject.org/wiki/Packaging:Haskell for more details
|
||||
|
||||
# "cabal"
|
||||
%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_static_setup:-dynamic} Setup\
|
||||
%cabal [ -x Setup ] || ghc --make -package Cabal -no-user-package-db %{!?ghc_static_setup:-dynamic} Setup\
|
||||
LANG=C.utf8\
|
||||
./Setup
|
||||
|
||||
# compiler version
|
||||
%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
||||
%ghc_version %{?ghc_version_override}%{!?ghc_version_override:%(rpm -q --qf %%{version} %{?ghc_name}%{!?ghc_name:ghc}-compiler)}
|
||||
|
||||
# ghc_bin_build: -W: use default ghc (ie ignore ghc_name)
|
||||
%ghc_bin_build(W)\
|
||||
%ghc_fix_doc_perms\
|
||||
%{?!ghc_debuginfo:%undefine _enable_debug_packages}\
|
||||
%cabal_configure\
|
||||
%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}
|
||||
|
||||
# ghc_lib_build_without_haddock [name] [version]
|
||||
%ghc_lib_build_without_haddock()\
|
||||
%ghc_fix_doc_perms\
|
||||
%{?!ghc_debuginfo:%undefine _enable_debug_packages}\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8\
|
||||
licensedirversion=%{?2:-%2}\
|
||||
%endif\
|
||||
%cabal_configure %{?with_ghc_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
||||
%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_build [name] [version]
|
||||
%ghc_lib_build()\
|
||||
%ghc_lib_build_without_haddock %{?1} %{?2}\
|
||||
%if %{with haddock}\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\
|
||||
%cabal haddock --html --hyperlink-source --hoogle %{?cabal_haddock_options}\
|
||||
fi\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# install bin package
|
||||
%ghc_bin_install()\
|
||||
%cabal_install\
|
||||
%ghc_delete_rpaths\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_install [name] [version]
|
||||
%ghc_lib_install(m)\
|
||||
%cabal_install\
|
||||
%cabal_pkg_conf %{?1} %{?2}\
|
||||
%ghc_gen_filelists %{-m} %{?1} %{?2}\
|
||||
%ghc_delete_rpaths\
|
||||
%{nil}
|
||||
|
||||
# create and install package.conf file
|
||||
# cabal_pkg_conf [name] [version]
|
||||
%cabal_pkg_conf()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
%cabal register --gen-pkg-config\
|
||||
if [ -d "%{ghclibdir}/lib" ]; then\
|
||||
subsubdir=/lib\
|
||||
fi\
|
||||
if [ -d %{pkgnamever}.conf ]; then\
|
||||
for i in $(ls "%{pkgnamever}.conf/"); do\
|
||||
sub=$(echo $i | sed -e "s/^[0-9]\\+-//")\
|
||||
install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/${sub}.conf\
|
||||
done\
|
||||
else\
|
||||
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}.conf\
|
||||
fi\
|
||||
%{nil}
|
||||
|
||||
%ghc_set_gcc_flags\
|
||||
%global _lto_cflags %{nil}\
|
||||
%global __brp_strip_lto %{nil}\
|
||||
# -Wunused-label is extremely noisy\
|
||||
%ifarch s390x\
|
||||
CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\
|
||||
CFLAGS="$(echo ${CFLAGS:-%optflags} | sed -e 's/-Wall //' -e 's/-Werror=format-security //')"\
|
||||
%else\
|
||||
CFLAGS="${CFLAGS:-%optflags}"\
|
||||
%endif\
|
||||
export CFLAGS\
|
||||
%undefine _package_note_flags\
|
||||
%global _hardened_ldflags %{nil}\
|
||||
export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\
|
||||
%{nil}
|
||||
@ -28,8 +94,11 @@ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\
|
||||
if ! [ -f Setup.hs -o -f Setup.lhs ]; then\
|
||||
cp %{_datadir}/ghc-rpm-macros/Setup.hs .\
|
||||
fi\
|
||||
if [ -d "%{ghclibdir}/lib" ]; then\
|
||||
subsubdir=/lib\
|
||||
fi\
|
||||
%cabal --version\
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" --disable-executable-stripping --disable-library-stripping %{?cabal_configure_options} $cabal_configure_extra_options
|
||||
%cabal configure %{!-W:%{?ghc_name:--with-compiler=%{_bindir}/ghc-%{ghc_version}}} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler'${subsubdir}/'$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc --dynlibdir=%{?_ghcdynlibdir}%{?!_ghcdynlibdir:%{_libdir}/ghc-%{ghc_version}${subsubdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')} -fhide-source-paths" %{?cabal_configure_options} $cabal_configure_extra_options
|
||||
|
||||
# install
|
||||
%cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options}
|
||||
@ -43,8 +112,14 @@ fi\
|
||||
# no _pkgdocdir in EPEL <= 7
|
||||
%ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
|
||||
|
||||
# library package prefix
|
||||
%ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}
|
||||
|
||||
# top ghcdocdir
|
||||
%_ghc_doc_dir %{_docdir}/%{ghc_prefix}
|
||||
|
||||
# root dir for ghc docs (used by ghc.spec)
|
||||
%ghc_html_dir %{_docdir}/ghc/html
|
||||
%ghc_html_dir %{_ghc_doc_dir}/html
|
||||
# deprecates
|
||||
%ghcdocbasedir %ghc_html_dir
|
||||
|
||||
@ -61,117 +136,131 @@ fi\
|
||||
# top library dir
|
||||
%ghclibdir %{_libdir}/ghc-%{ghc_version}
|
||||
|
||||
%ghcliblib %{ghclibdir}%{?with_hadrian:/lib}
|
||||
|
||||
%_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}
|
||||
|
||||
# ghc_gen_filelists [name] [version]
|
||||
%ghc_gen_filelists()\
|
||||
# deprecated
|
||||
%ghclibplatform %{ghcliblib}%{?with_hadrian:/%{ghcplatform}}
|
||||
|
||||
# Cabal has specific arch names
|
||||
%ghcplatform %(echo %{_arch} | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version}
|
||||
|
||||
# ghc_gen_filelists [-m] [name] [version]
|
||||
%ghc_gen_filelists(m)\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
|
||||
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||
if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/)" ]; then\
|
||||
echo "%{buildroot}%{ghclibdir}/package.conf.d/*.conf not found"\
|
||||
%if %{without hadrian}\
|
||||
if [ -d "%{ghclibdir}/lib" ]; then\
|
||||
subsubdir=/lib\
|
||||
fi\
|
||||
%endif\
|
||||
if [ -z "$(ls %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
|
||||
echo "%{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf not found"\
|
||||
exit 1\
|
||||
fi\
|
||||
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||
touch %{basepkg}.files %{basepkg}-devel.files\
|
||||
ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
|
||||
pkgdir="%{ghclibdir}/%{pkgnamever}"\
|
||||
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
||||
%if %{defined _ghcdynlibdir}\
|
||||
echo "${pkgdir}" >> %{basepkg}-devel.files\
|
||||
%else\
|
||||
echo "%%dir ${pkgdir}" >> %{basepkg}.files\
|
||||
find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
||||
find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\
|
||||
%endif\
|
||||
echo "%%attr(755,root,root) %{?_ghcdynlibdir}%{!?_ghcdynlibdir:${pkgdir}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
fi\
|
||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||
fi\
|
||||
%define basepkg %{ghc_prefix}-%{pkgname}\
|
||||
rm -f %{basepkg}.files %{basepkg}-doc.files\
|
||||
touch %{basepkg}.files %{basepkg}-doc.files\
|
||||
%if 0%{?1:1}\
|
||||
for i in $(ls %{buildroot}%{_ghclicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\
|
||||
echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\
|
||||
if [ -d "%{buildroot}%{_ghclicensedir}/%{basepkg}" ]; then\
|
||||
for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\
|
||||
echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
|
||||
done\
|
||||
fi\
|
||||
%endif\
|
||||
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
||||
for i in %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghcliblib}${subsubdir}%{?with_hadrian:/%{ghcplatform}}%{!?with_hadrian:%{?base_ver:/%{pkgnamever}}}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\
|
||||
if [ -x "$i" ]; then\
|
||||
echo $i >> %{basepkg}.files\
|
||||
else\
|
||||
echo $i: not found\
|
||||
%if 0%{!-m:1}\
|
||||
exit 1\
|
||||
%endif\
|
||||
fi\
|
||||
done\
|
||||
pkgdir="%{ghcliblib}${subsubdir}%{?with_hadrian:/%{ghcplatform}}/%{pkgnamever}"\
|
||||
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
||||
find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\
|
||||
else\
|
||||
rm -f %{basepkg}-devel.files %{basepkg}-prof.files\
|
||||
touch %{basepkg}-devel.files %{basepkg}-prof.files\
|
||||
fi\
|
||||
ls %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
|
||||
%if %{with haddock}\
|
||||
haddock_dir=%{ghc_html_libraries_dir}/%{pkgnamever}\
|
||||
if [ -d %{buildroot}$haddock_dir ]; then\
|
||||
echo $haddock_dir >> %{basepkg}-doc.files\
|
||||
%if %{with hadrian}\
|
||||
# for < 9.4.1-rc1\
|
||||
else\
|
||||
haddock_dir=%{ghc_html_libraries_dir}/%{pkgname}\
|
||||
if [ -d %{buildroot}$haddock_dir ]; then\
|
||||
echo $haddock_dir >> %{basepkg}-doc.files\
|
||||
fi\
|
||||
%endif\
|
||||
fi\
|
||||
%endif\
|
||||
for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\
|
||||
if [ -f "$i" ]; then\
|
||||
sed -i -e "s!%{buildroot}!!g" $i\
|
||||
fi\
|
||||
done\
|
||||
%{nil}
|
||||
|
||||
# create and install package.conf file
|
||||
# cabal_pkg_conf [name] [version]
|
||||
%cabal_pkg_conf()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
%cabal register --gen-pkg-config\
|
||||
if [ -d %{pkgnamever}.conf ]; then\
|
||||
for i in $(ls "%{pkgnamever}.conf/"); do\
|
||||
sub=$(echo $i | sed -e "s/^[0-9]\\+-//")\
|
||||
install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghclibdir}/package.conf.d/${sub}.conf\
|
||||
# from ghc.spec merge_filelist
|
||||
%ghc_merge_filelist()\
|
||||
cat %{name}-%1.files >> %{name}-%2.files\
|
||||
cat %{name}-%1-devel.files >> %{name}-%2-devel.files\
|
||||
%if %{with haddock}\
|
||||
cat %{name}-%1-doc.files >> %{name}-%2-doc.files\
|
||||
%endif\
|
||||
%if %{with ghc_prof}\
|
||||
cat %{name}-%1-prof.files >> %{name}-%2-prof.files\
|
||||
%endif\
|
||||
if [ "%1" != "rts" ]; then\
|
||||
cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
|
||||
echo "%%license libraries/LICENSE.%1" >> %{name}-%2.files\
|
||||
fi\
|
||||
%{nil}
|
||||
|
||||
# workaround Cabal bug causing executable extra-source-files
|
||||
%ghc_fix_doc_perms\
|
||||
for f in $(ls | grep -i -e '^\\(ANNOUNCE\\|AUTHORS\\|CHANGELOG\\|CHANGES\\|CONTRIBUTORS\\|README\\|TODO\\)'); do\
|
||||
if [ -f $f -a -x $f ]; then chmod a-x $f; fi\
|
||||
done\
|
||||
else\
|
||||
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
|
||||
fi\
|
||||
%{nil}
|
||||
|
||||
# ghc_bin_build
|
||||
%ghc_bin_build\
|
||||
%undefine _enable_debug_packages\
|
||||
%cabal_configure\
|
||||
%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}
|
||||
|
||||
# ghc_lib_build_without_haddock [name] [version]
|
||||
%ghc_lib_build_without_haddock()\
|
||||
%undefine _enable_debug_packages\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8\
|
||||
licensedirversion=%{?2:-%2}\
|
||||
%endif\
|
||||
%cabal_configure %{!?without_prof:-p} --enable-shared %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
||||
%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_build [name] [version]
|
||||
%ghc_lib_build()\
|
||||
%ghc_lib_build_without_haddock %{?1} %{?2}\
|
||||
%if %{undefined without_haddock}\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\
|
||||
%cabal haddock --html --hyperlink-source --hoogle %{?cabal_haddock_options}\
|
||||
fi\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# install bin package
|
||||
%ghc_bin_install()\
|
||||
%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\
|
||||
%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\
|
||||
%cabal_install\
|
||||
%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_install [name] [version]
|
||||
%ghc_lib_install()\
|
||||
%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\
|
||||
%{!?_fileattrsdir:%global __find_provides %{_rpmconfigdir}/rpmdeps --provides}\
|
||||
%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\
|
||||
%cabal_install\
|
||||
%cabal_pkg_conf %{?1} %{?2}\
|
||||
%ghc_gen_filelists %{?1} %{?2}\
|
||||
%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
|
||||
%{nil}
|
||||
|
||||
# ghc_fix_rpath lib-ver ...
|
||||
%ghc_fix_rpath()\
|
||||
%if %{undefined ghc_without_dynamic}\
|
||||
# ghc_delete_rpaths
|
||||
%ghc_delete_rpaths\
|
||||
%if %{undefined disable_ghc_delete_rpaths}\
|
||||
echo "running ghc_delete_rpaths:"\
|
||||
if ! type chrpath > /dev/null; then exit 1; fi\
|
||||
for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
||||
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
||||
if [ -x "$i" ]; then\
|
||||
%if %{defined _ghcdynlibdir}\
|
||||
chrpath -d $i\
|
||||
%else\
|
||||
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
||||
case "$rpath" in\
|
||||
*$PWD/*) chrpath -r "%{ghclibdir}/lib:%{ghclibdir}/lib/%{ghcplatform}" $i ;;\
|
||||
*) ;;\
|
||||
esac\
|
||||
%endif\
|
||||
else\
|
||||
echo "%%ghc_delete_rpath: no $i executable"\
|
||||
exit 1\
|
||||
fi\
|
||||
done\
|
||||
%endif
|
||||
|
||||
# deprecated by ghc_delete_rpaths in F35
|
||||
%ghc_fix_rpath()\
|
||||
%if %{undefined disable_ghc_fix_rpath}\
|
||||
if ! type chrpath > /dev/null; then exit 1; fi\
|
||||
echo "ghc_fix_rpath %*"\
|
||||
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
||||
for lib in %*; do\
|
||||
if [ -x "$i" ]; then\
|
||||
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
||||
@ -179,16 +268,23 @@ for lib in %*; do\
|
||||
*$PWD/$lib/dist/build*)\
|
||||
case %{ghc_version} in\
|
||||
7.10.*)\
|
||||
pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\
|
||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\
|
||||
pkgid=$(cd %{buildroot}%{ghcliblib}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\
|
||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/package.conf.d field $pkgid library-dirs) ;;\
|
||||
8.0)\
|
||||
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
|
||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
|
||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
|
||||
*)\
|
||||
syspath="" ;;\
|
||||
esac\
|
||||
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\
|
||||
if [ "$newrpath" = "%{_libdir}" ]; then\
|
||||
chrpath -d $i\
|
||||
else\
|
||||
chrpath -r $newrpath $i\
|
||||
fi\
|
||||
;;\
|
||||
%{_libdir})\
|
||||
chrpath -d $i\
|
||||
;;\
|
||||
esac\
|
||||
else\
|
||||
@ -197,45 +293,11 @@ for lib in %*; do\
|
||||
fi\
|
||||
done\
|
||||
done\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# Deprecated by ghc_fix_rpath:
|
||||
# ghc_fix_dynamic_rpath prog ...
|
||||
%ghc_fix_dynamic_rpath()\
|
||||
%if %{undefined ghc_without_dynamic}\
|
||||
if ! type chrpath > /dev/null; then exit 1; fi\
|
||||
pdir=$(pwd)\
|
||||
for i in %*; do\
|
||||
case $i in\
|
||||
/*) prog=%{buildroot}$i ;;\
|
||||
*) prog=%{buildroot}%{_bindir}/$i ;;\
|
||||
esac\
|
||||
if [ -x "$prog" ]; then\
|
||||
rpath=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\
|
||||
case $rpath in\
|
||||
*$pdir*)\
|
||||
newrpath=$(echo $rpath | sed -e "s@$pdir/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\
|
||||
chrpath -r $newrpath $prog\
|
||||
;;\
|
||||
esac\
|
||||
else\
|
||||
echo "%%ghc_fix_dynamic_rpath: no such file $prog"\
|
||||
exit 1\
|
||||
fi\
|
||||
done\
|
||||
%endif\
|
||||
%{nil}
|
||||
%endif
|
||||
|
||||
%ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || :
|
||||
|
||||
# deprecated
|
||||
%ghc_bootstrap\
|
||||
%global without_prof 1\
|
||||
%global without_haddock 1\
|
||||
%global without_manual 1
|
||||
|
||||
# skip prof libs and documentation
|
||||
%ghc_quick_build\
|
||||
%global without_prof 1\
|
||||
%global without_haddock 1
|
||||
%undefine with_ghc_prof\
|
||||
%undefine with_haddock
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*-
|
||||
|
||||
# ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-x] [name-version]
|
||||
# ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-m] [-x] [name-version]
|
||||
# for backward compat also support: ghc_lib_subpackage name version
|
||||
%ghc_lib_subpackage(c:dl:x)\
|
||||
%ghc_lib_subpackage(c:dl:mx)\
|
||||
%define pkgname %{?2:%{1}}%{!?2:%{lua:\
|
||||
local pv = rpm.expand("%1")\
|
||||
local _, _, name = string.find(pv, "^([%a%d-]+)-")\
|
||||
@ -12,56 +12,82 @@ print(name)\
|
||||
local pv = rpm.expand("%1")\
|
||||
print(string.sub(pv, string.find(pv, "[%d.]+$")))\
|
||||
}}\
|
||||
%global ghc_subpackages_list %{?ghc_subpackages_list} %{pkgname}-%{pkgver}\
|
||||
%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\
|
||||
%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\
|
||||
%define basepkg %{ghc_prefix}-%{pkgname}\
|
||||
%if 0%{!-m:1}\
|
||||
%package -n %{basepkg}\
|
||||
Summary: Haskell %{pkgname} library\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 6\
|
||||
Group: System/Libraries\
|
||||
%endif\
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
Url: http://hackage.haskell.org/package/%{pkgname}\
|
||||
Url: https://hackage.haskell.org/package/%{pkgname}\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\
|
||||
%{?ghc_obsoletes_name:Obsoletes: %{ghc_obsoletes_name}-%{pkgname} < %{pkgver}-%{release}}\
|
||||
\
|
||||
%description -n %{basepkg}\
|
||||
This package provides the Haskell %{pkgname} library.\
|
||||
\
|
||||
%endif\
|
||||
%package -n %{basepkg}-devel\
|
||||
Summary: Haskell %{pkgname} library development files\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 6\
|
||||
Group: Development/Languages/Other\
|
||||
%endif\
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\
|
||||
Requires(postun): %{ghc_prefix}-compiler = %{ghc_version}\
|
||||
Provides: %{basepkg}-static = %{pkgver}-%{release}\
|
||||
Provides: %{basepkg}-static%{?_isa} = %{pkgver}-%{release}\
|
||||
Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\
|
||||
%if 0%{!-m:1}\
|
||||
Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\
|
||||
%endif\
|
||||
%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\
|
||||
%{-c:Requires: %{-c*}}\
|
||||
%{?ghc_obsoletes_name:Obsoletes: %{ghc_obsoletes_name}-%{pkgname}-devel < %{pkgver}-%{release}}\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\
|
||||
\
|
||||
%description -n %{basepkg}-devel\
|
||||
This package provides the Haskell %{pkgname} library development files.\
|
||||
\
|
||||
%post -n %{basepkg}-devel\
|
||||
%ghc_pkg_recache\
|
||||
%if 0%{!-m:1}\
|
||||
%if %{with haddock}\
|
||||
%package -n %{basepkg}-doc\
|
||||
Summary: Haskell %{pkgname} library documentation\
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
BuildArch: noarch\
|
||||
Requires: %{ghc_prefix}-filesystem\
|
||||
%{?ghc_obsoletes_name:Obsoletes: %{ghc_obsoletes_name}-%{pkgname}-doc < %{pkgver}-%{release}}\
|
||||
Supplements: (%{basepkg}-devel and %{ghc_prefix}-doc)\
|
||||
\
|
||||
%postun -n %{basepkg}-devel\
|
||||
%ghc_pkg_recache\
|
||||
%description -n %{basepkg}-doc\
|
||||
This package provides the Haskell %{pkgname} library documentation.\
|
||||
%endif\
|
||||
\
|
||||
%if %{with ghc_prof}\
|
||||
%package -n %{basepkg}-prof\
|
||||
Summary: Haskell %{pkgname} profiling library\
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
Requires: %{ghc_prefix}-%{pkgname}-devel%{?_isa} = %{pkgver}-%{release}\
|
||||
%{?ghc_obsoletes_name:Obsoletes: %{ghc_obsoletes_name}-%{pkgname}-prof < %{pkgver}-%{release}}\
|
||||
Supplements: (%{basepkg}-devel and %{ghc_prefix}-prof)\
|
||||
\
|
||||
%description -n %{basepkg}-prof\
|
||||
This package provides the Haskell %{pkgname} profiling library.\
|
||||
%endif\
|
||||
\
|
||||
%files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 6\
|
||||
%defattr(-,root,root,-)\
|
||||
%endif\
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
\
|
||||
%files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\
|
||||
%if 0%{?rhel} && 0%{?rhel} < 6\
|
||||
%defattr(-,root,root,-)\
|
||||
%endif\
|
||||
%{?devel_doc_files:%doc %devel_doc_files}\
|
||||
%files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\
|
||||
%if 0%{!-m:1}\
|
||||
\
|
||||
%if %{with haddock}\
|
||||
%files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\
|
||||
%endif\
|
||||
\
|
||||
%if %{with ghc_prof}\
|
||||
%files -n %{basepkg}-prof -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-prof.files\
|
||||
%endif\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# ghc_libs_build [name-version] ...
|
||||
@ -96,5 +122,4 @@ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\
|
||||
%ghc_lib_install $name $ver\
|
||||
cd ..\
|
||||
done\
|
||||
%ghc_fix_rpath $args\
|
||||
%{nil}
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
%_ghcdocdir %{_ghclicensedir}/%{name}
|
||||
|
||||
%_ghcdynlibdir %{_libdir}
|
||||
|
||||
%ghc_without_dynamic 1
|
||||
|
||||
%cabal_install_options -v
|
||||
# enable library documentation in doc subpkgs
|
||||
%with_haddock 1
|
||||
|
||||
# %%{?_smp_ncpus_max:--jobs=%%{?_smp_ncpus_max}}
|
||||
%ghc_smp_mflags %{?_smp_mflags}
|
||||
|
@ -28,7 +28,7 @@ if [ -f /etc/os-release ]; then
|
||||
else
|
||||
case $VERSION_ID in
|
||||
7.*) BRANCH=epel7 ;;
|
||||
*) BRANCH=master ;;
|
||||
*) BRANCH=rawhide ;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user