summaryrefslogtreecommitdiffstats
path: root/tools/hsb2hs/hsb2hs.spec
blob: 302e15a1e68d833475eb4f09ba599c21183a101e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Name:           hsb2hs
Version:        0.1
Release:        2%{?dist}
Summary:        Preprocesses a file, adding blobs from files as string literals

License:        BSD
Group:          Developments/Tools
URL:            http://hackage.haskell.org/package/%{name}
Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz

BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-filepath-devel
#BuildRequires:  ghc-preprocessor-tools-devel
# End cabal-rpm deps
BuildRequires:  cabal-install
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Hsb2hs is a preprocessor that allows you to include the contents of files as
string literals in your Haskell programs and libraries. It is an alternative to
file-embed for those who do not want to rely on Template Haskell.


%prep
%setup -q


%build
%global cabal cabal
[ -d ~/.cabal ] || %cabal update
%cabal install --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}


%install
rm -rf %{buildroot}
install -D -p dist/build/%{name}/%{name} %{buildroot}%{_bindir}/%{name}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/%{name}


%changelog
* Thu Dec 25 2014 Jens Petersen <petersen@redhat.com> - 0.1-2
- use cabal install instead of cabal-dev
- run cabal update if no ~/.cabal

* Thu Jan 30 2014 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.1-1
- spec file generated by cabal-rpm-0.8.7