]>
Commit | Line | Data |
---|---|---|
99773ddb | 1 | %define pkgname c2hs |
91532835 JB |
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 | |
99773ddb | 4 | Name: ghc-%{pkgname} |
89a928fa | 5 | Version: 0.28.8 |
1adcfc51 | 6 | Release: 3 |
99773ddb JP |
7 | License: BSD |
8 | Group: Development/Languages | |
9 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
89a928fa | 10 | # Source0-md5: 0d21188ad3737724e500982b88e32b9d |
99773ddb | 11 | URL: http://hackage.haskell.org/package/c2hs/ |
89a928fa JP |
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 | |
99773ddb JP |
18 | BuildRequires: rpmbuild(macros) >= 1.608 |
19 | %requires_eq ghc | |
89a928fa JP |
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 | |
99773ddb JP |
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 | |
91532835 JB |
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. | |
99773ddb JP |
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 | ||
908b40a5 JR |
61 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
62 | ||
99773ddb JP |
63 | %clean |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
908b40a5 | 68 | %doc AUTHORS ChangeLog README |
99773ddb | 69 | %attr(755,root,root) %{_bindir}/c2hs |