]> git.pld-linux.org Git - packages/darcs.git/blob - darcs.spec
- unconditional noarch subpackages
[packages/darcs.git] / darcs.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        David's Advanced Revision Control System - yet another replacement for CVS
6 Summary(pl.UTF-8):      David's Advanced Revision Control System - jeszcze jeden zamiennik CVS-a
7 Name:           darcs
8 Version:        2.5.2
9 Release:        1
10 License:        GPL v2
11 Group:          Development/Version Control
12 Source0:        http://darcs.net/releases/%{name}-%{version}.tar.gz
13 # Source0-md5:  491b6ca01dec245a16112ad2c7e07dc1
14 Patch0:         %{name}-ghc72.patch
15 Patch1:         %{name}-relax-regex-libs-deps.patch
16 Patch2:         %{name}-tests-ghc72.patch
17 URL:            http://darcs.net/
18 BuildRequires:  curl-devel >= 7.19.1
19 BuildRequires:  ghc >= 6.12.3
20 BuildRequires:  ghc-hashed-storage >= 0.5
21 BuildRequires:  ghc-haskeline >= 0.6.1
22 BuildRequires:  ghc-mmap >= 1:0.5
23 BuildRequires:  ghc-tar >= 0.3
24 BuildRequires:  ghc-terminfo >= 0.3
25 BuildRequires:  ghc-utf8-string >= 0.3
26 BuildRequires:  ghc-zlib >= 0.5.1.0
27 BuildRequires:  gmp-devel
28 BuildRequires:  pkgconfig
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         ghcdir          ghc-%(/usr/bin/ghc --numeric-version)
32
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
36 X, FreeBSD, OpenBSD and Microsoft Windows. Darcs includes a CGI
37 script, which can be used to view the contents of your repository.
38
39 %description -l pl.UTF-8
40 David's Advanced Revision Control System (zaawansowany system kontroli
41 wersji Davida) to jeszcze jeden zamiennik CVS-a. Jest napisany w
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.
45
46 %package doc
47 Summary:        Documentation for darcs
48 Group:          Documentation
49 %if "%{_rpmversion}" >= "5"
50 BuildArch:      noarch
51 %endif
52
53 %description doc
54 The documentation files that come with darcs.
55
56 %package -n bash-completion-darcs
57 Summary:        bash-completion for darcs
58 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla darcsa
59 Group:          Applications/Shells
60 Requires:       bash-completion
61 %if "%{_rpmversion}" >= "5"
62 BuildArch:      noarch
63 %endif
64
65 %description -n bash-completion-darcs
66 This package provides bash-completion for darcs.
67
68 %description -n bash-completion-darcs -l pl.UTF-8
69 Pakiet ten dostarcza bashowe uzupełnianie nazw dla darcsa.
70
71 %prep
72 %setup -q
73 %patch0 -p1
74 %patch1 -p1
75 %patch2 -p1
76
77 %build
78 runhaskell Setup.lhs configure -v2 \
79         --prefix=%{_prefix} \
80         --libdir=%{_libdir} \
81         --libexecdir=%{_libexecdir} \
82         --docdir=%{_docdir}/%{name}-%{version} \
83         --flags="curl curl-pipelining terminfo color mmap"
84
85 runhaskell Setup.lhs build
86 %{?with_tests:runhaskell Setup.lhs test}
87
88 runhaskell Setup.lhs haddock --executables \
89         --css=doc/darcs.css
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93
94 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
95
96 # work around automatic haddock docs installation
97 rm -rf %{name}-%{version}-doc
98 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
99
100 # bash completion
101 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
102 install -p contrib/darcs_completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/%{name}
103
104 # we only want the binary
105 rm -r $RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(644,root,root,755)
112 %doc NEWS README
113 %attr(755,root,root) %{_bindir}/*
114 %{_mandir}/man1/*
115
116 %files doc
117 %defattr(644,root,root,755)
118 %doc %{name}-%{version}-doc/html/*
119
120 %files -n bash-completion-darcs
121 %defattr(644,root,root,755)
122 %{_sysconfdir}/bash_completion.d/%{name}
This page took 0.089406 seconds and 3 git commands to generate.