]> git.pld-linux.org Git - packages/ghc-c2hs.git/blob - ghc-c2hs.spec
09f1f1d0cb3787aa15f7d2fb07a650d262393f6e
[packages/ghc-c2hs.git] / ghc-c2hs.spec
1 %define         pkgname c2hs
2 Summary:        C->Haskell FFI tool that gives some cross-language type safety
3 Summary(pl.UTF-8):      Narzędzie FFI C->Haskell dające pewne bezpieczeństwo typów między językami
4 Name:           ghc-%{pkgname}
5 Version:        0.28.8
6 Release:        2
7 License:        BSD
8 Group:          Development/Languages
9 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
10 # Source0-md5:  0d21188ad3737724e500982b88e32b9d
11 URL:            http://hackage.haskell.org/package/c2hs/
12 BuildRequires:  ghc >= 8.0
13 BuildRequires:  ghc-base >= 2
14 BuildRequires:  ghc-bytestring
15 BuildRequires:  ghc-dlist
16 BuildRequires:  ghc-filepath
17 BuildRequires:  ghc-language-c >= 0.7.1
18 BuildRequires:  rpmbuild(macros) >= 1.608
19 %requires_eq    ghc
20 Requires:       ghc-base >= 2
21 Requires:       ghc-bytestring
22 Requires:       ghc-dlist
23 Requires:       ghc-filepath
24 Requires:       ghc-language-c >= 0.7.1
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 # debuginfo is not useful for ghc
28 %define         _enable_debug_packages  0
29
30 %description
31 C->Haskell assists in the development of Haskell bindings to C
32 libraries. It extracts interface information from C header files and
33 generates Haskell code with foreign imports and marshaling. Unlike
34 writing foreign imports by hand (or using hsc2hs), this ensures that C
35 functions are imported with the correct Haskell types.
36
37 %description -l pl.UTF-8
38 C->Haskell pomaga przy tworzeniu wiązań Haskella do bibliotek C.
39 Wydobywa informacje o interfejsach z plików nagłówkowych C i generuje
40 kod w Haskellu z obcymi importami i szeregowaniem. W przeciwieństwie
41 do ręcznego pisania importów (albo używania hsc2hs) zapewnia, że
42 funkcje C są importowane z poprawnymi typami Haskella.
43
44 %prep
45 %setup -q -n %{pkgname}-%{version}
46
47 %build
48 runhaskell Setup.hs configure -v2 \
49         --prefix=%{_prefix} \
50         --libdir=%{_libdir} \
51         --libexecdir=%{_libexecdir} \
52         --docdir=%{_docdir}/%{name}-%{version}
53
54 runhaskell Setup.hs build
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58
59 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
60
61 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %files
67 %defattr(644,root,root,755)
68 %doc AUTHORS ChangeLog README
69 %attr(755,root,root) %{_bindir}/c2hs
This page took 0.029888 seconds and 2 git commands to generate.