packages: hlint/hlint.spec - %requires_eq dep on ghc, doc package, more macros

glen glen at pld-linux.org
Mon Feb 28 10:25:13 CET 2011


Author: glen                         Date: Mon Feb 28 09:25:13 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- %requires_eq dep on ghc, doc package, more macros

---- Files affected:
packages/hlint:
   hlint.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/hlint/hlint.spec
diff -u packages/hlint/hlint.spec:1.3 packages/hlint/hlint.spec:1.4
--- packages/hlint/hlint.spec:1.3	Wed Dec 15 14:50:23 2010
+++ packages/hlint/hlint.spec	Mon Feb 28 10:25:08 2011
@@ -2,10 +2,10 @@
 Summary:	Haskell Source code suggestions
 Name:		hlint
 Version:	1.8.3
-Release:	1
+Release:	2
 License:	GPL
 Group:		Development/Languages
-Source0:	http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+Source0:	http://hackage.haskell.org/packages/archive/hlint/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	af5a287804f0ed1ba41728febf74296f
 URL:		http://community.haskell.org/~ndm/hlint/
 BuildRequires:	cpphs
@@ -14,14 +14,27 @@
 BuildRequires:	ghc-transformers
 BuildRequires:	ghc-uniplate
 BuildRequires:	hscolour
-%requires_releq	ghc
+BuildRequires:	rpmbuild(macros) >= 1.608
+%requires_eq	ghc
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		ghcdir		ghc-%(/usr/bin/ghc --numeric-version)
+# debuginfo is not useful for ghc
+%define		_enable_debug_packages	0
 
 %description
 HLint gives suggestions on how to improve your source code.
 
+%package doc
+Summary:	HTML documentation for %{pkgname}
+Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla %{pkgname}
+Group:		Documentation
+
+%description doc
+HTML documentation for %{pkgname}.
+
+%description doc -l pl.UTF-8
+Dokumentacja w formacie HTML dla %{pkgname}.
+
 %prep
 %setup -q
 
@@ -43,7 +56,7 @@
 
 # work around automatic haddock docs installation
 rm -rf %{name}-%{version}-doc
-cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
+cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
 
 runhaskell Setup.hs register \
 	--gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
@@ -52,25 +65,31 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/usr/bin/ghc-pkg recache
+%ghc_pkg_recache
 
 %postun
-/usr/bin/ghc-pkg recache
+%ghc_pkg_recache
 
 %files
 %defattr(644,root,root,755)
-%doc %{name}-%{version}-doc/html
 %attr(755,root,root) %{_bindir}/hlint
 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
 %{_libdir}/%{ghcdir}/%{name}-%{version}
 %{_datadir}/%{name}-%{version}
 
+%files doc
+%defattr(644,root,root,755)
+%doc %{name}-%{version}-doc/*
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2011/02/28 09:25:08  glen
+- %requires_eq dep on ghc, doc package, more macros
+
 Revision 1.3  2010/12/15 13:50:23  baggins
 - rel 1
 - updated BRs
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/hlint/hlint.spec?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list