Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
Jens Petersen | c686b6b7b5 | |
Jens Petersen | d800b80ec2 | |
Jens Petersen | 323f8546f6 | |
Jens Petersen | 84179c2284 | |
Jens Petersen | 1e7fb276ce | |
Jens Petersen | 7b664babf6 | |
Jens Petersen | da9bbc6fa4 | |
Jens Petersen | f9f8e2fc3f | |
Jens Petersen | bc8d4ce998 |
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e +x
|
||||
|
||||
USAGE="Usage: $0 dep old new"
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEP=$1
|
||||
OLD=$(echo $2 | sed -e "s/*/\\\\*/g" -e "s/\./\\\\./g")
|
||||
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
|
||||
fi
|
||||
|
||||
BREAK=[^[:alnum:]-]
|
||||
|
||||
if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then
|
||||
echo "$CABALFILE does not match: $DEP $OLD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
BACKUP=.orig
|
||||
fi
|
||||
|
||||
sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO:
|
||||
# support setting flag when no upstream default
|
||||
|
||||
set -e +x
|
||||
|
||||
USAGE="Usage: $0 FLAG [True|False]"
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FLAG=$1
|
||||
|
||||
NEW=$2
|
||||
case $NEW in
|
||||
True) OLD=False ;;
|
||||
False) OLD=True ;;
|
||||
*) echo "Flag value can only be set to True or False" ; exit 1 ;;
|
||||
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
|
||||
fi
|
||||
|
||||
if ! grep -q -i "^flag *$FLAG" $CABALFILE; then
|
||||
echo "$CABALFILE does have flag $FLAG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default:"; then
|
||||
echo "$CABALFILE: $FLAG flag might not have a default"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default: *$OLD"; then
|
||||
echo "$CABALFILE: $FLAG flag already defaults to $NEW"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
BACKUP=.orig
|
||||
fi
|
||||
|
||||
sed -i$BACKUP -e "/[Ff]lag *$FLAG/,/[Dd]efault: *$OLD/ s/\([Dd]efault: *\)$OLD/\1$NEW/" $CABALFILE
|
14
ghc-deps.sh
14
ghc-deps.sh
|
@ -16,7 +16,7 @@ GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
|||
if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then
|
||||
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
|
||||
else
|
||||
GHC_PKG=/usr/bin/ghc-pkg
|
||||
GHC_PKG="/usr/bin/ghc-pkg"
|
||||
fi
|
||||
|
||||
case $MODE in
|
||||
|
@ -43,6 +43,7 @@ for i in $files; do
|
|||
SELF=""
|
||||
case $LIB_FILE in
|
||||
*.so) META=ghc ;;
|
||||
*_p.a) META=ghc-prof SELF=ghc-devel ;;
|
||||
*.a) META=ghc-devel
|
||||
if [ "$SHARED" ]; then
|
||||
SELF=ghc
|
||||
|
@ -54,14 +55,14 @@ for i in $files; do
|
|||
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
||||
for i in $HASHS; do
|
||||
case $i in
|
||||
*-*) echo "$META($i)" ;;
|
||||
*-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
if [ "$MODE" = "--requires" -a "$SELF" ]; then
|
||||
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//")
|
||||
for i in $HASHS; do
|
||||
echo "$SELF($i)"
|
||||
echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
@ -69,9 +70,12 @@ for i in $files; do
|
|||
elif [ "$MODE" = "--requires" ]; then
|
||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||
BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||
if [ -d "$PKGCONFDIR" ]; then
|
||||
PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR"
|
||||
fi
|
||||
for p in ${BIN_DEPS}; do
|
||||
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
|
||||
echo "ghc($HASH)"
|
||||
HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//")
|
||||
echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RPM Macros for packaging Haskell cabalized packages -*-rpm-spec-*-
|
||||
# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details
|
||||
# see https://fedoraproject.org/wiki/Packaging:Haskell for more details
|
||||
|
||||
# "cabal"
|
||||
%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\
|
||||
|
@ -21,7 +21,7 @@ fi
|
|||
# configure
|
||||
%cabal_configure\
|
||||
%ghc_check_bootstrap\
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
|
||||
|
||||
# install
|
||||
%cabal_install %cabal copy --destdir=%{buildroot} -v
|
||||
|
@ -30,6 +30,8 @@ fi
|
|||
%ghcdocbasedir %{_docdir}/ghc/html
|
||||
# libraries doc dir
|
||||
%ghclibdocdir %{ghcdocbasedir}/libraries
|
||||
# pkg doc dir
|
||||
%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version}
|
||||
# top library dir
|
||||
%ghclibdir %{_libdir}/ghc-%{ghc_version}
|
||||
|
||||
|
@ -42,43 +44,37 @@ fi
|
|||
%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{defined ghc_without_shared}\
|
||||
if [ "%{name}" = "ghc-%{pkg_name}" ]; then\
|
||||
if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||
mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\
|
||||
fi\
|
||||
%if %{undefined ghc_exclude_docdir}\
|
||||
echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
%endif\
|
||||
fi\
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\
|
||||
if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||
echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
|
||||
echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}.files\
|
||||
elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\
|
||||
echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
|
||||
echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}.files\
|
||||
fi\
|
||||
%endif\
|
||||
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
||||
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.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\
|
||||
fi\
|
||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||
fi\
|
||||
sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\
|
||||
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
||||
if [ -f "$i" ]; then\
|
||||
sed -i -e "s!%{buildroot}!!g" $i\
|
||||
fi\
|
||||
done\
|
||||
%{nil}
|
||||
|
||||
%ghc_add_basepkg_file()\
|
||||
%define basepkg ghc-%{pkg_name}\
|
||||
echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files
|
||||
echo "%*" >> %{basepkg}.files
|
||||
|
||||
# compiler version
|
||||
%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
||||
|
@ -98,15 +94,14 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
|
|||
%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\
|
||||
Requires(post): ghc-compiler = %{ghc_version}\
|
||||
Requires(postun): ghc-compiler = %{ghc_version}\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
%if 0%{!?-m:1}\
|
||||
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||
%endif
|
||||
|
||||
%ghc_shared_files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
%files -n %{basepkg} -f %{basepkg}.files\
|
||||
%defattr(-,root,root,-)\
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_package [-c cdepslist] [-h pkgdepslist]
|
||||
|
@ -131,7 +126,7 @@ Group: System Environment/Libraries\
|
|||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
|
||||
# ghc_description [name] [version]
|
||||
%ghc_description\
|
||||
%ghc_description()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%description -n %{basepkg}\
|
||||
|
@ -140,8 +135,8 @@ Group: System Environment/Libraries\
|
|||
This package provides the shared library.\
|
||||
%endif
|
||||
|
||||
# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
%ghc_binlib_package(c:h:l:x)\
|
||||
# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
%ghc_lib_subpackage(c:h:l:x)\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
|
@ -154,16 +149,12 @@ This package provides the shared library.\
|
|||
%ghc_lib_package\
|
||||
%{nil}
|
||||
|
||||
%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
|
||||
|
||||
# (deprecated) for docs post and postun
|
||||
%ghc_reindex_haddock :
|
||||
|
||||
%ghc_devel_files\
|
||||
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
|
||||
%if %{defined ghc_without_shared}\
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
%defattr(-,root,root,-)\
|
||||
%{?devel_doc_files:%doc %devel_doc_files}\
|
||||
%{nil}
|
||||
|
||||
|
@ -175,8 +166,9 @@ This package provides the shared library.\
|
|||
%ghc_devel_files\
|
||||
%{nil}
|
||||
|
||||
# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
|
||||
%ghc_devel_package(c:h:l:)\
|
||||
# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version]
|
||||
# -m : meta-package
|
||||
%ghc_devel_package(c:h:l:m)\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
|
@ -192,13 +184,14 @@ Group: Development/Libraries\
|
|||
%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
|
||||
Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\
|
||||
Provides: %{basepkg}-doc = %{pkgver}-%{release}\
|
||||
Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\
|
||||
%if %{undefined without_prof}\
|
||||
Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
||||
%endif
|
||||
|
||||
# ghc_devel_description
|
||||
%ghc_devel_description\
|
||||
%ghc_devel_description()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%description -n %{basepkg}-devel\
|
||||
|
@ -207,7 +200,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
|||
This package contains the development files.
|
||||
|
||||
# ghc_devel_post_postun
|
||||
%ghc_devel_post_postun\
|
||||
%ghc_devel_post_postun()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%post -n %{basepkg}-devel\
|
||||
|
@ -229,54 +222,71 @@ This package contains the development files.
|
|||
%ghc_devel_files\
|
||||
%{nil}
|
||||
|
||||
# ghc_strip_dynlinked
|
||||
%ghc_strip_dynlinked\
|
||||
%if %{undefined __debug_package}\
|
||||
find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
||||
%endif
|
||||
|
||||
# ghc_bin_build
|
||||
%ghc_bin_build\
|
||||
%global debug_package %{nil}\
|
||||
%cabal_configure\
|
||||
%cabal build
|
||||
|
||||
# ghc_lib_build [name] [version]
|
||||
%ghc_lib_build()\
|
||||
# ghc_lib_build_without_haddock [name] [version]
|
||||
%ghc_lib_build_without_haddock()\
|
||||
%global debug_package %{nil}\
|
||||
%{?1:cd %1-%2}\
|
||||
%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
|
||||
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\
|
||||
%cabal build\
|
||||
%if %{undefined without_haddock}\
|
||||
%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
%endif\
|
||||
%{?1:cd -}\
|
||||
%{nil}
|
||||
|
||||
# install bin package
|
||||
%ghc_bin_install\
|
||||
%if %{undefined ghc_bootstrapping}\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
# ghc_lib_build [name] [version]
|
||||
%ghc_lib_build()\
|
||||
%ghc_lib_build_without_haddock\
|
||||
%if %{undefined without_haddock}\
|
||||
%cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
# ghc_strip_dynlinked
|
||||
%ghc_strip_dynlinked\
|
||||
%if %{undefined __debug_package}\
|
||||
find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
||||
%endif
|
||||
|
||||
# install bin package
|
||||
%ghc_bin_install()\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
%global __find_requires %{_prefix}/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
%cabal_install\
|
||||
%ghc_strip_dynlinked
|
||||
%{!?1:%ghc_strip_dynlinked}\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_install [name] [version]
|
||||
%ghc_lib_install()\
|
||||
%if %{undefined ghc_bootstrapping}\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
%endif\
|
||||
%{?1:cd %1-%2}\
|
||||
%global __find_provides %{_prefix}/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
|
||||
%global __find_requires %{_prefix}/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
%cabal_install\
|
||||
%cabal_pkg_conf\
|
||||
%{?1:cd -}\
|
||||
%ghc_gen_filelists\
|
||||
%{!?1:%ghc_strip_dynlinked}\
|
||||
%{nil}
|
||||
|
||||
# ghc_fix_dynamic_rpath prog ...
|
||||
%ghc_fix_dynamic_rpath()\
|
||||
%if %{undefined ghc_without_dynamic}\
|
||||
PDIR=$(cd ..; pwd)\
|
||||
for i in %*; do\
|
||||
PROG=%{buildroot}%{_bindir}/$i\
|
||||
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
|
||||
case $RPATH in\
|
||||
*$PDIR*)\
|
||||
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
|
||||
chrpath -r $NEWRPATH $PROG\
|
||||
;;\
|
||||
esac\
|
||||
done\
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
|
||||
|
||||
# - without_hscolour, without_testsuite, and ghc_bootstrapping
|
||||
# need to be set locally in the spec file
|
||||
|
||||
|
@ -291,5 +301,3 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
|
|||
%global ghc_without_shared 1\
|
||||
%global ghc_without_dynamic 1\
|
||||
%ghc_test
|
||||
|
||||
%ghc_exclude_docdir 1
|
||||
|
|
|
@ -2,24 +2,33 @@
|
|||
|
||||
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
||||
|
||||
# uncomment to bootstrap without hscolour
|
||||
#%%global without_hscolour 1
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 0.90
|
||||
Version: 0.15.15.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Macros for building packages for GHC
|
||||
Summary: RPM macros for building packages for GHC
|
||||
|
||||
Group: Development/Libraries
|
||||
License: GPLv3
|
||||
URL: https://fedoraproject.org/wiki/Haskell_SIG
|
||||
URL: https://fedoraproject.org/wiki/Packaging:Haskell
|
||||
|
||||
# This is a Fedora maintained package which is specific to
|
||||
# our distribution. Thus the source is only available from
|
||||
# within this srpm. But it could be moved to fedorahosted.org
|
||||
# if other rpm distros want to use it.
|
||||
# This is a Fedora maintained package, originally made for
|
||||
# the distribution. Hence the source is currently only available
|
||||
# from this package. But it could be hosted on fedorahosted.org
|
||||
# for example if other rpm distros would prefer that.
|
||||
Source0: ghc-rpm-macros.ghc
|
||||
Source1: COPYING
|
||||
Source2: AUTHORS
|
||||
Source3: ghc-deps.sh
|
||||
Source4: cabal-tweak-dep-ver
|
||||
Source5: cabal-tweak-flag
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: redhat-rpm-config
|
||||
%if %{undefined without_hscolour}
|
||||
Requires: hscolour
|
||||
%endif
|
||||
|
||||
%description
|
||||
A set of macros for building GHC packages following the Haskell Guidelines
|
||||
|
@ -37,10 +46,15 @@ echo no build stage needed
|
|||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file}
|
||||
|
||||
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
|
||||
|
||||
# this is why this package is now arch-dependent:
|
||||
# turn off shared libs and dynamic linking on secondary archs
|
||||
%ifnarch %{ix86} x86_64
|
||||
|
@ -53,18 +67,104 @@ EOF
|
|||
%endif
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING AUTHORS
|
||||
%config(noreplace) %{macros_file}
|
||||
%{macros_file}
|
||||
%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
%{_bindir}/cabal-tweak-dep-ver
|
||||
%{_bindir}/cabal-tweak-flag
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Mar 19 2012 Jens Petersen <petersen@redhat.com> - 0.90-1
|
||||
- use new rpm metadata hash format for ghc-7.4
|
||||
- drop prof meta hash data
|
||||
- no longer include doc files automatically by default
|
||||
- no longer provide doc subpackage
|
||||
* Mon Jan 13 2014 Jens Petersen <petersen@redhat.com> - 0.15.15.3-1
|
||||
- enable shared subpackages and dynamic linking on intel archs
|
||||
|
||||
* Fri Dec 27 2013 Jens Petersen <petersen@redhat.com> - 0.15.15.2-1
|
||||
- drop the base lib pkg requires properly
|
||||
|
||||
* Thu Dec 26 2013 Jens Petersen <petersen@redhat.com> - 0.15.15.1-1
|
||||
- rebase from 0.10.61.1 to 0.15.16 from epel6
|
||||
- disable shared libraries and dynamic linking
|
||||
since ghc rts fails to dyn link
|
||||
- no base library packages
|
||||
- substitute _rpmconfigdir since not defined in el5 rpm
|
||||
- restore buildroot define and cleaning
|
||||
|
||||
* Fri Oct 25 2013 Jens Petersen <petersen@redhat.com>
|
||||
- add ghcpkgdocdir
|
||||
|
||||
* Mon Jul 22 2013 Jens Petersen <petersen@redhat.com> - 0.15.15-1
|
||||
- include docdir in library base package also when no shared library
|
||||
|
||||
* Thu Jul 11 2013 Jens Petersen <petersen@redhat.com> - 0.15.14-1
|
||||
- create lib base package also when ghc_without_shared is set (#983137)
|
||||
and other ghc_without_shared cleanup
|
||||
|
||||
* Sat Jul 6 2013 Jens Petersen <petersen@redhat.com> - 0.15.13-1
|
||||
- restore docdir autopackaging for f17 and el6
|
||||
|
||||
* Fri Jun 21 2013 Jens Petersen <petersen@redhat.com> - 0.15.12-1
|
||||
- ghc_fix_dynamic_rpath: do not assume first RPATH
|
||||
- packaging for without_shared is now done the same way as shared
|
||||
to make non-shared arch packages same as shared ones:
|
||||
so all archs will now have base library binary packages
|
||||
- remove deprecated ghc_exclude_docdir
|
||||
- Remove %%config from %%{_sysconfdir}/rpm/macros.*
|
||||
(https://fedorahosted.org/fpc/ticket/259).
|
||||
- only add lib pkgdir to filelist if it exists
|
||||
to fix haskell-platform build on secondary archs (no shared libs)
|
||||
|
||||
* Tue Jan 22 2013 Jens Petersen <petersen@redhat.com> - 0.15.11-1
|
||||
- simplify cabal-tweak-flag script to take one flag value
|
||||
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
|
||||
linked against their own libraries
|
||||
|
||||
* Sat Jan 19 2013 Jens Petersen <petersen@redhat.com> - 0.15.10-1
|
||||
- be more careful about library pkgdir ownership (#893777)
|
||||
- add cabal-tweak-flag script for toggling flag default
|
||||
|
||||
* Thu Oct 25 2012 Jens Petersen <petersen@redhat.com> - 0.15.9-2
|
||||
- BR redhat-rpm-config instead of ghc-rpm-macros
|
||||
- no longer set without_hscolour in macros.ghc for bootstrapping
|
||||
|
||||
* Tue Oct 9 2012 Jens Petersen <petersen@redhat.com> - 0.15.9-1
|
||||
- "cabal haddock" needs --html option with --hoogle to output html
|
||||
|
||||
* Thu Sep 20 2012 Jens Petersen <petersen@redhat.com> - 0.15.8-1
|
||||
- ghc-rpm-macros now requires hscolour so packages no longer need to BR it
|
||||
- this can be disabled for bootstrapping by setting without_hscolour
|
||||
- make haddock build hoogle files
|
||||
- ghc_lib_build no longer builds redundant ghci .o library files
|
||||
|
||||
* Wed Jul 11 2012 Jens Petersen <petersen@redhat.com> - 0.15.7-1
|
||||
- let ghc_bin_install take an arg to disable implicit stripping for subpackages
|
||||
- fix doc handling of subpackages for ghc_without_shared
|
||||
- without ghc_exclude_docdir include doc dir also for subpackages
|
||||
- rename ghc_binlib_package to ghc_lib_subpackage
|
||||
- add ghc_lib_build_without_haddock
|
||||
- no longer drop into package dirs when subpackaging with ghc_lib_build and
|
||||
ghc_lib_install
|
||||
|
||||
* Fri Jun 22 2012 Jens Petersen <petersen@redhat.com> - 0.15.6.1-1
|
||||
- cabal-tweak-dep-ver: be careful only to match complete dep name and
|
||||
do not match beyond ","
|
||||
|
||||
* Fri Jun 22 2012 Jens Petersen <petersen@redhat.com> - 0.15.6-1
|
||||
- cabal-tweak-dep-ver: new script to tweak depends version bounds in .cabal
|
||||
from ghc-rpm-macros-0.95.5
|
||||
- ghc-dep.sh: only use buildroot package.conf.d if it exists
|
||||
- ghc-deps.sh: look in buildroot package.conf.d for program deps
|
||||
- add a meta-package option to ghc_devel_package and use in ghc_devel_requires
|
||||
- allow ghc_description, ghc_devel_description, ghc_devel_post_postun
|
||||
to take args
|
||||
- support meta packages like haskell-platform without base lib files
|
||||
- add shell variable cabal_configure_extra_options to cabal_configure for
|
||||
local configuration
|
||||
- do not provide prof when without_prof set
|
||||
|
||||
* Thu Feb 23 2012 Jens Petersen <petersen@redhat.com> - 0.15.5-1
|
||||
|
@ -92,96 +192,49 @@ EOF
|
|||
- do not use ghc user config by default when compiling Setup
|
||||
- do not setup hscolour if without_hscolour defined
|
||||
|
||||
* Thu Nov 17 2011 Jens Petersen <petersen@redhat.com> - 0.14.2-1
|
||||
* Thu Nov 17 2011 Jens Petersen <petersen@redhat.com> - 0.10.61-1
|
||||
- test for HsColour directly when running "cabal haddock" instead of
|
||||
check hscolour is available (reported by Giam Teck Choon, #753833)
|
||||
checking for without_haddock
|
||||
|
||||
* Sat Nov 12 2011 Jens Petersen <petersen@redhat.com> - 0.14.1-1
|
||||
- fix double listing of docdir in base lib package
|
||||
|
||||
* Tue Nov 1 2011 Jens Petersen <petersen@redhat.com> - 0.14-1
|
||||
- replace devel ghc requires with ghc-compiler
|
||||
- disable testsuite in ghc_bootstrap
|
||||
|
||||
* Mon Oct 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.13-1
|
||||
- add ghc_bootstrapping to ghc_bootstrap for packages other than ghc
|
||||
- make ghc-deps.sh also work when bootstrapping a new ghc version
|
||||
|
||||
* Sat Oct 15 2011 Jens Petersen <petersen@redhat.com> - 0.13.12-1
|
||||
- add ghc_exclude_docdir to exclude docdir from filelists
|
||||
|
||||
* Fri Sep 30 2011 Jens Petersen <petersen@redhat.com> - 0.13.11-1
|
||||
* Fri Sep 30 2011 Jens Petersen <petersen@redhat.com> - 0.10.60-1
|
||||
- fix devel subpackage's prof and doc obsoletes and provides versions
|
||||
for multiple lib packages like ghc (reported by Henrik Nordström)
|
||||
|
||||
* Tue Sep 13 2011 Jens Petersen <petersen@redhat.com> - 0.13.10-1
|
||||
* Tue Sep 13 2011 Jens Petersen <petersen@redhat.com> - 0.10.59-1
|
||||
- do not setup ghc-deps.sh when ghc_bootstrapping
|
||||
- add ghc_test build config
|
||||
|
||||
* Wed Aug 3 2011 Jens Petersen <petersen@redhat.com> - 0.13.9-1
|
||||
- drop without_testsuite from ghc_bootstrap since it breaks koji
|
||||
|
||||
* Fri Jul 1 2011 Jens Petersen <petersen@redhat.com> - 0.13.8-1
|
||||
- drop redundant defattr from filelists
|
||||
- move dependency generator setup from ghc_package_devel to ghc_lib_install
|
||||
in line with ghc_bin_install
|
||||
|
||||
* Mon Jun 27 2011 Jens Petersen <petersen@redhat.com> - 0.13.7-1
|
||||
- add requires for redhat-rpm-config for ghc_arches
|
||||
- drop ghc_bootstrapping from ghc_bootstrap: doesn't work for koji
|
||||
|
||||
* Fri Jun 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.6-1
|
||||
- also set ghc_without_dynamic for ghc_bootstrap
|
||||
- drop without_hscolour from ghc_bootstrap: doesn't work for koji
|
||||
|
||||
* Fri Jun 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.5-1
|
||||
- ghc_bootstrap is now a macro which sets ghc_bootstrapping,
|
||||
ghc_without_shared, without_prof, without_haddock, without_hscolour,
|
||||
without_manual, without_testsuite
|
||||
- tweaks to ghc_check_bootstrap
|
||||
|
||||
* Fri Jun 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.4-1
|
||||
- ghc_bootstrap is now a macro providing bootstrap config
|
||||
- add ghc_check_bootstrap
|
||||
|
||||
* Thu Jun 2 2011 Jens Petersen <petersen@redhat.com> - 0.13.3-1
|
||||
- rename macros.ghc-pkg back to macros.ghc
|
||||
- move the devel summary prefix back to a suffix
|
||||
* Mon Jun 27 2011 Jens Petersen <petersen@redhat.com> - 0.10.58-1
|
||||
- add requires for redhat-rpm-config for ghc_arches
|
||||
|
||||
* Sat May 28 2011 Jens Petersen <petersen@redhat.com> - 0.13.2-1
|
||||
- macros need to live in /etc/rpm
|
||||
- use macro_file for macros.ghc filepath
|
||||
* Wed Jun 22 2011 Jens Petersen <petersen@redhat.com> - 0.10.57-1
|
||||
- ghc-deps.sh: also ignore base-3 since it is part of ghc-base
|
||||
|
||||
* Sat May 28 2011 Jens Petersen <petersen@redhat.com> - 0.13.1-1
|
||||
- move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config
|
||||
|
||||
* Wed May 11 2011 Jens Petersen <petersen@redhat.com> - 0.13-1
|
||||
* Mon Jun 13 2011 Jens Petersen <petersen@redhat.com> - 0.10.56-1
|
||||
- merge prof subpackages into devel to simplify packaging
|
||||
|
||||
* Mon May 9 2011 Jens Petersen <petersen@redhat.com> - 0.12.1-1
|
||||
- include ghc_pkg_c_deps even when -c option used
|
||||
|
||||
* Sat May 7 2011 Jens Petersen <petersen@redhat.com> - 0.12.0-1
|
||||
- drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof since
|
||||
ghc-deps.sh generates better inter-package dependencies already
|
||||
- condition --htmldir on pkg_name
|
||||
|
||||
* Fri Apr 1 2011 Jens Petersen <petersen@redhat.com> - 0.11.14-1
|
||||
- provides ghc-*-doc still needed for current lib templates
|
||||
* Mon May 9 2011 Jens Petersen <petersen@redhat.com> - 0.10.55-1
|
||||
- include ghc_pkg_c_deps even when -c option used
|
||||
|
||||
* Mon Mar 28 2011 Jens Petersen <petersen@redhat.com> - 0.11.13-1
|
||||
- ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package
|
||||
- abort cabal_configure if ghc is not self-bootstrapped
|
||||
- make ghc_reindex_haddock a safe no-op
|
||||
- no longer provide ghc-*-doc
|
||||
- no longer run ghc_reindex_haddock in ghc-*-devel scripts
|
||||
* Mon May 9 2011 Jens Petersen <petersen@redhat.com> - 0.10.54-1
|
||||
- ghc-deps.sh: ignore private ghc lib deps
|
||||
- macros.ghc: drop ghc-prof requires from ghc_prof_requires
|
||||
|
||||
* Thu Mar 10 2011 Jens Petersen <petersen@redhat.com> - 0.11.12-1
|
||||
* Sat May 7 2011 Jens Petersen <petersen@redhat.com> - 0.10.53-1
|
||||
- backport ghc-deps.sh rpm dependency script for automatic versioned
|
||||
library dependencies (without hashes)
|
||||
- drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof since
|
||||
ghc-deps.sh generates better inter-package dependencies already
|
||||
|
||||
* Wed Mar 16 2011 Jens Petersen <petersen@redhat.com> - 0.10.52-1
|
||||
- backport ghc fixes and secondary arch support from 0.11.12:
|
||||
- add ghc_pkg_obsoletes to binlib base lib package too
|
||||
|
||||
* Wed Mar 9 2011 Jens Petersen <petersen@redhat.com> - 0.11.11-1
|
||||
- add docdir when subpackaging packages too
|
||||
|
||||
* Sun Feb 13 2011 Jens Petersen <petersen@redhat.com> - 0.11.10-1
|
||||
- this package is now arch-dependent
|
||||
- rename without_shared to ghc_without_shared and without_dynamic
|
||||
to ghc_without_dynamic so that they can be globally defined for
|
||||
|
@ -189,97 +242,44 @@ EOF
|
|||
- use %%undefined macro
|
||||
- disable debug_package in ghc_bin_build and ghc_lib_build
|
||||
- set ghc_without_shared and ghc_without_dynamic on secondary
|
||||
(ie non main intel) archs
|
||||
(ie non main intel archs)
|
||||
- disable debuginfo for self
|
||||
|
||||
* Fri Feb 11 2011 Jens Petersen <petersen@redhat.com> - 0.11.9-1
|
||||
- revert "set without_shared and without_dynamic by default on secondary archs
|
||||
in cabal_bin_build and cabal_lib_build" change, since happening for all archs
|
||||
|
||||
* Thu Feb 10 2011 Jens Petersen <petersen@redhat.com> - 0.11.8-1
|
||||
- only link Setup dynamically if without_shared and without_dynamic not set
|
||||
- set without_shared and without_dynamic by default on secondary archs
|
||||
in cabal_bin_build and cabal_lib_build
|
||||
- add cabal_configure_options to pass extra options to cabal_configure
|
||||
|
||||
* Thu Feb 10 2011 Jens Petersen <petersen@redhat.com> - 0.11.7-1
|
||||
- fix ghc-deps.sh for without_shared libraries
|
||||
* Fri Feb 4 2011 Jens Petersen <petersen@redhat.com> - 0.10.51-1
|
||||
- ghc_binlib_package's -x option does not take an arg
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Sat Jan 29 2011 Jens Petersen <petersen@redhat.com> - 0.11.6-1
|
||||
- simplify adding shared subpackage license file
|
||||
- own ghc-deps.sh not /usr/lib/rpm
|
||||
|
||||
* Sun Jan 23 2011 Jens Petersen <petersen@redhat.com> - 0.11.5-1
|
||||
- add rpm hash requires for dynamic executables in ghc-deps.sh
|
||||
- compile Setup in cabal macro
|
||||
- use _rpmconfigdir
|
||||
|
||||
* Sat Jan 22 2011 Jens Petersen <petersen@redhat.com> - 0.11.4-1
|
||||
- drop deprecated ghcdocdir and ghcpkgdir
|
||||
* Sat Jan 29 2011 Jens Petersen <petersen@redhat.com> - 0.10.50-1
|
||||
- merge subpackaging support from 0.11.4:
|
||||
- drop ghcdocdir and ghcpkgdir
|
||||
- new ghclibdocdir
|
||||
- replace some missed RPM_BUILD_ROOT's
|
||||
- bring back ghc requires in ghc_devel_requires
|
||||
- improve prof summary and description
|
||||
- add without_prof and without_haddock option macros
|
||||
|
||||
* Fri Jan 21 2011 Jens Petersen <petersen@redhat.com> - 0.11.3-1
|
||||
- compile Setup to help speed up builds
|
||||
|
||||
* Thu Jan 20 2011 Jens Petersen <petersen@redhat.com> - 0.11.2-1
|
||||
- put docdir (license) also into shared lib subpackage
|
||||
- add ghc_binlib_package option to exclude package from ghc_packages_list
|
||||
- condition lib base package additional description for srpm
|
||||
|
||||
* Mon Jan 3 2011 Jens Petersen <petersen@redhat.com> - 0.11.1-1
|
||||
- use buildroot instead of RPM_BUILD_ROOT
|
||||
- rename ghcpkgbasedir to ghclibdir
|
||||
- split "[name-version]" args into "[name] [version]" args
|
||||
- move remaining name and version macro options (-n and -v) to args
|
||||
- drop deprecated -o options
|
||||
- move name and version macro options (-n and -v) to optional args
|
||||
- ghc_gen_filelists, ghc_lib_build, ghc_lib_install, cabal_pkg_conf
|
||||
now take optional "[name] [version]" args
|
||||
- drop with_devhelp since --html-help option gone from haddock-2.8.0
|
||||
- rename ghc_requires to ghc_devel_requires
|
||||
- drop ghc_doc_requires
|
||||
|
||||
* Thu Dec 30 2010 Jens Petersen <petersen@redhat.com> - 0.11.0-1
|
||||
- add support for subpackaging ghc's libraries:
|
||||
- deprecate ghcpkgdir and ghcdocdir from now on
|
||||
- ghc_gen_filelists optional arg is now name-version
|
||||
- ghc_lib_build, ghc_lib_install, cabal_pkg_conf now take optional
|
||||
name-version arg
|
||||
|
||||
* Mon Dec 20 2010 Jens Petersen <petersen@redhat.com> - 0.10.3-1
|
||||
* Wed Dec 29 2010 Jens Petersen <petersen@redhat.com> - 0.8.3-1
|
||||
- revert disabling debug_package, since with redhat-rpm-config installed
|
||||
the behaviour depended on the position of ghc_lib_package in the spec file
|
||||
(reported by narasim)
|
||||
|
||||
* Fri Nov 26 2010 Jens Petersen <petersen@redhat.com>
|
||||
- drop with_devhelp since --html-help option gone from haddock-2.8.0
|
||||
|
||||
* Tue Nov 23 2010 Jens Petersen <petersen@redhat.com> - 0.10.2-1
|
||||
- ignore ghc's builtin pseudo-libs
|
||||
|
||||
* Tue Nov 23 2010 Jens Petersen <petersen@redhat.com> - 0.10.1-1
|
||||
- bring back the explicit n-v-r internal package requires for devel and prof packages
|
||||
|
||||
* Mon Nov 22 2010 Jens Petersen <petersen@redhat.com> - 0.10.0-1
|
||||
- turn on pkg hash metadata (for ghc-7 builds)
|
||||
- ghc-deps.sh now requires an extra buildroot/ghcpkgbasedir arg
|
||||
- automatic internal package deps from prof to devel to base
|
||||
- rename ghc_requires to ghc_devel_requires
|
||||
- drop ghc_doc_requires
|
||||
- ghc_reindex_haddock is deprecated and now a no-op
|
||||
|
||||
* Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.9.1-1
|
||||
- fix without_shared build so it actually works
|
||||
|
||||
* Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.9.0-1
|
||||
- add rpm provides and requires script ghc-deps.sh for package hash metadata
|
||||
- turn on hash provides and disable debuginfo by default
|
||||
* Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.8.2-1
|
||||
- add ghc_pkg_obsoletes for obsoleting old packages
|
||||
- always obsolete -doc packages, but keep -o for now for backward compatibility
|
||||
- disable debuginfo by default
|
||||
- make shared and hscolour default
|
||||
- use without_shared and without_hscolour to disable them
|
||||
- add ghc_pkg_obsoletes for obsoleting old packages
|
||||
- fix without_shared build so it actually works
|
||||
- use ghcpkgbasedir
|
||||
- always obsolete -doc packages, but keep -o for now for backward compatibility
|
||||
|
||||
* Fri Jul 16 2010 Jens Petersen <petersen@redhat.com> - 0.8.1-1
|
||||
- fix ghc_strip_dynlinked when no dynlinked files
|
||||
|
|
Loading…
Reference in New Issue