]>
Commit | Line | Data |
---|---|---|
9ebc03ec JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
6d32792e | 4 | |
d8a15745 | 5 | Summary: David's Advanced Revision Control System - yet another replacement for CVS |
0765a5cd | 6 | Summary(pl.UTF-8): David's Advanced Revision Control System - jeszcze jeden zamiennik CVS-a |
c9782df6 | 7 | Name: darcs |
2dc05737 | 8 | Version: 2.5.2 |
479c0f57 | 9 | Release: 1 |
c9782df6 AM |
10 | License: GPL v2 |
11 | Group: Development/Version Control | |
677fe055 | 12 | Source0: http://darcs.net/releases/%{name}-%{version}.tar.gz |
2dc05737 JR |
13 | # Source0-md5: 491b6ca01dec245a16112ad2c7e07dc1 |
14 | Patch0: %{name}-ghc72.patch | |
15 | Patch1: %{name}-relax-regex-libs-deps.patch | |
16 | Patch2: %{name}-tests-ghc72.patch | |
ab3e5650 | 17 | URL: http://darcs.net/ |
1c75109a | 18 | BuildRequires: curl-devel >= 7.19.1 |
87d858c5 JR |
19 | BuildRequires: ghc >= 6.12.3 |
20 | BuildRequires: ghc-hashed-storage >= 0.5 | |
af3ac60f | 21 | BuildRequires: ghc-haskeline >= 0.6.1 |
87d858c5 | 22 | BuildRequires: ghc-mmap >= 1:0.5 |
3cc0dbe6 | 23 | BuildRequires: ghc-tar >= 0.3 |
1c75109a | 24 | BuildRequires: ghc-terminfo >= 0.3 |
af3ac60f | 25 | BuildRequires: ghc-utf8-string >= 0.3 |
1c75109a | 26 | BuildRequires: ghc-zlib >= 0.5.1.0 |
d0ff7293 | 27 | BuildRequires: gmp-devel |
28 | BuildRequires: pkgconfig | |
c9782df6 AM |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
87d858c5 | 31 | %define ghcdir ghc-%(/usr/bin/ghc --numeric-version) |
1c75109a | 32 | |
c9782df6 AM |
33 | %description |
34 | David's Advanced Revision Control System is yet another replacement | |
35 | for CVS. It is written in Haskell, and has been used on Linux, MacOS | |
d8a15745 | 36 | X, FreeBSD, OpenBSD and Microsoft Windows. Darcs includes a CGI |
c9782df6 AM |
37 | script, which can be used to view the contents of your repository. |
38 | ||
24e0d6cb | 39 | %description -l pl.UTF-8 |
d8a15745 JB |
40 | David's Advanced Revision Control System (zaawansowany system kontroli |
41 | wersji Davida) to jeszcze jeden zamiennik CVS-a. Jest napisany w | |
24e0d6cb JR |
42 | Haskellu, dotychczas był używany na Linuksie, MacOS-ie X, FreeBSD, |
43 | OpenBSD i Microsoft Windows. Darcs zawiera skrypt CGI, który może być | |
44 | używany do oglądania zawartości repozytorium. | |
d8a15745 | 45 | |
6d32792e ER |
46 | %package doc |
47 | Summary: Documentation for darcs | |
48 | Group: Documentation | |
6d32792e | 49 | BuildArch: noarch |
6d32792e ER |
50 | |
51 | %description doc | |
52 | The documentation files that come with darcs. | |
53 | ||
f1123fc2 JR |
54 | %package -n bash-completion-darcs |
55 | Summary: bash-completion for darcs | |
56 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla darcsa | |
57 | Group: Applications/Shells | |
58 | Requires: bash-completion | |
be3cffe5 | 59 | BuildArch: noarch |
f1123fc2 JR |
60 | |
61 | %description -n bash-completion-darcs | |
62 | This package provides bash-completion for darcs. | |
63 | ||
64 | %description -n bash-completion-darcs -l pl.UTF-8 | |
65 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla darcsa. | |
66 | ||
c9782df6 | 67 | %prep |
ab3e5650 | 68 | %setup -q |
9ebc03ec | 69 | %patch0 -p1 |
2dc05737 JR |
70 | %patch1 -p1 |
71 | %patch2 -p1 | |
ab3e5650 | 72 | |
c9782df6 | 73 | %build |
1c75109a JR |
74 | runhaskell Setup.lhs configure -v2 \ |
75 | --prefix=%{_prefix} \ | |
76 | --libdir=%{_libdir} \ | |
77 | --libexecdir=%{_libexecdir} \ | |
1c75109a JR |
78 | --docdir=%{_docdir}/%{name}-%{version} \ |
79 | --flags="curl curl-pipelining terminfo color mmap" | |
80 | ||
677fe055 | 81 | runhaskell Setup.lhs build |
9ebc03ec JR |
82 | %{?with_tests:runhaskell Setup.lhs test} |
83 | ||
1c75109a JR |
84 | runhaskell Setup.lhs haddock --executables \ |
85 | --css=doc/darcs.css | |
c9782df6 AM |
86 | |
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
1c75109a | 89 | |
677fe055 | 90 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT |
c9782df6 | 91 | |
1c75109a JR |
92 | # work around automatic haddock docs installation |
93 | rm -rf %{name}-%{version}-doc | |
94 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
95 | ||
f1123fc2 JR |
96 | # bash completion |
97 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d | |
1c75109a JR |
98 | install -p contrib/darcs_completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/%{name} |
99 | ||
100 | # we only want the binary | |
87d858c5 | 101 | rm -r $RPM_BUILD_ROOT/%{_libdir}/%{ghcdir} |
1c75109a | 102 | |
c9782df6 AM |
103 | %clean |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
1c75109a | 108 | %doc NEWS README |
c9782df6 | 109 | %attr(755,root,root) %{_bindir}/* |
1c75109a | 110 | %{_mandir}/man1/* |
f1123fc2 | 111 | |
6d32792e ER |
112 | %files doc |
113 | %defattr(644,root,root,755) | |
114 | %doc %{name}-%{version}-doc/html/* | |
115 | ||
f1123fc2 JR |
116 | %files -n bash-completion-darcs |
117 | %defattr(644,root,root,755) | |
118 | %{_sysconfdir}/bash_completion.d/%{name} |