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
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
20 Requires: ghc-base >= 2
21 Requires: ghc-bytestring
23 Requires: ghc-filepath
24 Requires: ghc-language-c >= 0.7.1
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 # debuginfo is not useful for ghc
28 %define _enable_debug_packages 0
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.
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.
45 %setup -q -n %{pkgname}-%{version}
48 runhaskell Setup.hs configure -v2 \
51 --libexecdir=%{_libexecdir} \
52 --docdir=%{_docdir}/%{name}-%{version}
54 runhaskell Setup.hs build
57 rm -rf $RPM_BUILD_ROOT
59 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
61 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
68 %doc AUTHORS ChangeLog README
69 %attr(755,root,root) %{_bindir}/c2hs