]> git.pld-linux.org Git - packages/mdadm.git/blob - mdadm.spec
- updated to 1.0.1
[packages/mdadm.git] / mdadm.spec
1 #
2 # Conditional build:
3 #  --without initrd -- don't build initrd version
4 Summary:        Tool for creating and maintaining software RAID devices
5 Summary(pl):    Narzêdzie do tworzenia i obs³ugi programowych macierzy RAID
6 Name:           mdadm
7 Version:        1.0.1
8 Release:        1
9 License:        GPL
10 Group:          Base
11 Source0:        http://www.cse.unsw.edu.au/~neilb/source/mdadm/%{name}-%{version}.tgz
12 Patch0:         %{name}-BOOT.patch
13 %{!?_without_initrd:BuildRequires:      dietlibc-static}
14 BuildRequires:  groff
15 Obsoletes:      mdctl
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _sbindir                /sbin
19
20 %description
21 This package includes tool you need to set up and maintain a software
22 RAID device under Linux. It's thought as an alternative to raidtools
23 package.
24
25 %description -l pl
26 Pakiet ten zawiera narzêdzie potrzebne do tworzenia i obs³ugi
27 programowych macierzy RAID. Program ten jest pomy¶lany jako
28 alternatywa dla pakietu raidtools.
29
30 %package initrd
31 Summary:        Tool for maintaining software RAID devices - initrd version
32 Summary(pl):    Narzêdzie do obs³ugi programowych macierzy RAID, wersja dla initrd
33 Group:          Base
34
35 %description initrd
36 Tool for maintaining software RAID devices - statically linked for
37 initrd.
38
39 %description initrd -l pl
40 Narzêdzie do zarz±dzania programowymi macierzami RAID - statycznie
41 zlinkowane na potrzeby initrd.
42
43 %prep
44 %setup -q
45 #%patch0 -p1
46
47 %build
48 %{!?_without_initrd:%{__make} CC="%{_arch}-dietlibc-gcc" CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" static}
49 %{!?_without_initrd:mv mdadm initrd-mdadm}
50 %{!?_without_initrd:%{__make} clean}
51
52 %{__make} \
53         CC="%{__cc}" \
54         CFLAGS="%{rpmcflags} -D_GNU_SOURCE" \
55         LDFLAGS="%{rpmldflags}" \
56         SYSCONFDIR="%{_sysconfdir}"
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_sysconfdir}}
61
62 %{!?_without_initrd:install initrd-mdadm $RPM_BUILD_ROOT%{_sbindir}}
63 install mdadm $RPM_BUILD_ROOT%{_sbindir}
64
65 install *.5 $RPM_BUILD_ROOT%{_mandir}/man5
66 install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
67
68 install mdadm.conf-example $RPM_BUILD_ROOT%{_sysconfdir}/mdadm.conf
69
70 ln -s mdadm $RPM_BUILD_ROOT%{_sbindir}/mdctl
71 %{!?_without_initrd:ln -s initrd-mdadm $RPM_BUILD_ROOT%{_sbindir}/initrd-mdctl}
72
73 gzip -9nf ANNOUNCE TODO
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
79 %defattr(644,root,root,755)
80 %attr(755,root,root) %{_sbindir}/*
81 %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/mdadm.conf
82 %{_mandir}/man?/*
83
84 %if %{?_without_initrd:0}%{!?_without_initrd:1}
85 %files initrd
86 %defattr(644,root,root,755)
87 %attr(755,root,root) %{_sbindir}/initrd-mdadm
88 %endif
This page took 0.030373 seconds and 3 git commands to generate.