diff --git a/ghc-deps.sh b/ghc-deps.sh index 324926c..9186ca1 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -80,5 +80,3 @@ for i in $files; do fi fi done - -echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f2569e4..c686dd8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.1 +Version: 1.3.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -24,6 +24,7 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra +Source7: ghc.attr Requires: ghc-srpm-macros # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 @@ -62,6 +63,7 @@ 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 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -70,6 +72,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %files %doc COPYING AUTHORS %{macros_dir}/macros.ghc +%{_prefix}/lib/rpm/fileattrs/ghc.attr %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag @@ -80,6 +83,11 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Thu Aug 21 2014 Jens Petersen - 1.3.2-1 +- add an rpm .attr file for ghc-deps.sh rather than running it + as an external dep generator (#1132275) + (see http://rpm.org/wiki/PackagerDocs/DependencyGenerator) + * Wed Aug 20 2014 Jens Petersen - 1.3.1-1 - fix warning in macros.ghc-extra about unused pkgnamever diff --git a/ghc.attr b/ghc.attr new file mode 100644 index 0000000..9f638d0 --- /dev/null +++ b/ghc.attr @@ -0,0 +1,3 @@ +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a) diff --git a/macros.ghc b/macros.ghc index b3aeab3..f86b07c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -107,17 +107,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # install bin package %ghc_bin_install()\ -%global _use_internal_dependency_generator 0\ -%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ %{nil} # ghc_lib_install [name] [version] %ghc_lib_install()\ -%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}\ %cabal_install\ %cabal_pkg_conf\ %ghc_gen_filelists\ diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index b73d731..038ed0a 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -24,7 +24,7 @@ ARCH=$(arch) if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) case $VERSION_ID in - 21) BRANCH=master ;; + 22) BRANCH=master ;; 7.*) BRANCH=el7 ;; *) BRANCH="f$VERSION_ID" ;; esac