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