- ghc_gen_filelists: determine keyname with pkgnamever not just pkgname (fixes building newer version of installed package) - use _rpmconfigdir macro - support el6 (no fileattrs or /usr/lib/rpm/macros.d) - change url to github - add and use ghc-pkg-wrapper script - use ghc-pkg key field (for ghc-7.10) - configure libsubdir using pkgkey like ghc-cabal - handle no ghc-srpm-macros for fedora < 21 - fix ghc-pkg path in ghc-deps.sh for ghc-7.10 - version ghc-pkg in ghc_pkg_recache - update ghc_gen_filelists to use new keyed library filepaths and specify libHS*.so more loosely - ghc-dep.sh now just makes versioned devel reqs - rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr - enable debuginfo package
		
			
				
	
	
		
			58 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# RPM Macros for packaging Haskell packages with multiple libs  -*-rpm-spec-*-
 | 
						|
 | 
						|
# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name] [version]
 | 
						|
%ghc_lib_subpackage(c:l:x)\
 | 
						|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
 | 
						|
%define pkgver %{?2}%{!?2:%{version}}\
 | 
						|
%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\
 | 
						|
%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\
 | 
						|
%define basepkg %{ghc_prefix}-%{pkgname}\
 | 
						|
%package -n %{basepkg}\
 | 
						|
Summary:        Haskell %{pkgname} library\
 | 
						|
%if 0%{?rhel} && 0%{?rhel} < 7\
 | 
						|
Group:          System/Libraries\
 | 
						|
%endif\
 | 
						|
%{?1:Version:        %{pkgver}}\
 | 
						|
%{-l:License:        %{-l*}}\
 | 
						|
Url:            http://hackage.haskell.org/package/%{pkgname}\
 | 
						|
%{?ghc_pkg_obsoletes:Obsoletes:      %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\
 | 
						|
\
 | 
						|
%description -n %{basepkg}\
 | 
						|
This package provides the Haskell %{pkgname} library.\
 | 
						|
\
 | 
						|
%package -n %{basepkg}-devel\
 | 
						|
Summary:        Haskell %{pkgname} library development files\
 | 
						|
%if 0%{?rhel} && 0%{?rhel} < 7\
 | 
						|
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}\
 | 
						|
Requires:       %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\
 | 
						|
%{?ghc_pkg_c_deps:Requires:       %{ghc_pkg_c_deps}}\
 | 
						|
%{-c:Requires:       %{-c*}}\
 | 
						|
%{?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\
 | 
						|
\
 | 
						|
%postun -n %{basepkg}-devel\
 | 
						|
%ghc_pkg_recache\
 | 
						|
\
 | 
						|
%files -n %{basepkg} -f %{basepkg}.files\
 | 
						|
%if 0%{?rhel} && 0%{?rhel} < 7\
 | 
						|
%defattr(-,root,root,-)\
 | 
						|
%endif\
 | 
						|
%{?base_doc_files:%doc %base_doc_files}\
 | 
						|
\
 | 
						|
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
 | 
						|
%if 0%{?rhel} && 0%{?rhel} < 7\
 | 
						|
%defattr(-,root,root,-)\
 | 
						|
%endif\
 | 
						|
%{?devel_doc_files:%doc %devel_doc_files}\
 | 
						|
%{nil}
 |