add UploadCPAN back to .shipit
[MogileFS-Server.git] / MogileFS-Server.spec
blob50147b162ec4c37cfefaf73af65e307e5a047d8c
1 %define perl_vendorlib %(eval "`/usr/bin/perl -V:installvendorlib`"; echo $installvendorlib)
3 name: MogileFS-Server
4 summary: MogileFS-Server - MogileFS Server daemons and utilities.
5 version: 2.36
6 release: 2%{?dist}
7 vendor: Alan Kasindorf <dormando@rydia.net>
8 packager: Jonathan Steinert <hachi@cpan.org>
9 license: Artistic
10 group: Applications/CPAN
11 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
12 buildarch: noarch
13 source: mogilefs-server-%{version}.tar.gz
14 autoreq: no
15 requires: MogileFS-Server-mogilefsd = %{version}-%{release}
16 requires: MogileFS-Server-mogstored = %{version}-%{release}
18 # Build requires for mogilefsd
19 buildrequires: perl(DBI), perl(DBD::mysql), perl(MogileFS::Client), MogileFS-Utils, mysql
20 # Build requires for mogstored
21 buildrequires: perl(Perlbal) >= 1.73
23 %description
24 MogileFS Server daemons and utilities.
25 This is a dummy package which depends on all the others so you can install them all easily.
27 %prep
28 rm -rf "%{buildroot}"
29 %setup -n mogilefs-server-%{version}
31 %build
32 %{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX=%{buildroot}%{_prefix}
33 make all
34 make test
36 %install
37 make pure_install
39 [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
41 # remove mogdeps and related files
42 rm -rf %{buildroot}/%{perl_vendorlib}/mogdeps
43 rm -f %{buildroot}/usr/share/man/man3/mogdeps::*
45 # remove special files
46 find %{buildroot} \( \
47 -name "perllocal.pod" \
48 -o -name ".packlist" \
49 -o -name "*.bs" \
50 \) -exec rm -f {} \;
52 # no empty directories
53 find %{buildroot}%{_prefix} \
54 -type d -depth -empty \
55 -exec rmdir {} \;
57 %clean
58 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
60 %files
61 %defattr(-,root,root)
63 %package -n MogileFS-Server-mogilefsd
64 summary: MogileFS-Server-mogilefsd - Mogilefsd and related libraries.
65 group: Applications/CPAN
66 autoreq: no
67 requires: perl(DBI) >= 1.44, perl(DBD::mysql) >= 3
68 obsoletes: MogileFS-Server-utils <= 2.16
70 %description -n MogileFS-Server-mogilefsd
71 Mogilefsd and related libraries.
73 %files -n MogileFS-Server-mogilefsd
74 %defattr(-,root,root)
75 %{_prefix}/bin/mogilefsd
76 %{_prefix}/bin/mogdbsetup
77 %{perl_vendorlib}/MogileFS/*
78 %{_prefix}/share/man/man1/mogilefsd.1.gz
79 %{_prefix}/share/man/man3/MogileFS::*.3pm.gz
81 %package -n MogileFS-Server-mogstored
82 summary: MogileFS-Server-mogstored - Mogstored and related libraries.
83 group: Applications/CPAN
84 autoreq: no
85 requires: perl-Perlbal >= 1.73
86 obsoletes: MogileFS-Server-utils <= 2.16
88 %description -n MogileFS-Server-mogstored
89 Mogstored and related libraries.
91 %files -n MogileFS-Server-mogstored
92 %defattr(-,root,root)
93 %{_prefix}/bin/mogstored
94 %{_prefix}/bin/mogautomount
95 %{perl_vendorlib}/Mogstored/*
96 %{_prefix}/share/man/man1/mogstored.1.gz
97 %{_prefix}/share/man/man1/mogautomount.1.gz