1 |
# |
2 |
# please keep this file backportable on the system running on kenobi |
3 |
# |
4 |
%define my_py_ver %(echo %py_ver | tr -d -c '[:digit:]') |
5 |
%if "%my_py_ver" == "" |
6 |
# Assume 2.6 if we don't have python at src.rpm creation time |
7 |
%define my_py_ver 26 |
8 |
%endif |
9 |
|
10 |
Name: repsys |
11 |
Version: 1.8 |
12 |
Epoch: 1 |
13 |
Release: %mkrel 2 |
14 |
Summary: Tools for Mandriva Linux repository access and management |
15 |
Group: Development/Other |
16 |
Source: %{name}-binrepo-svn-%{version}.tar.bz2 |
17 |
Source1: mdk-rebrand-mdk |
18 |
Source2: repsys.conf |
19 |
Patch0: repsys.conf.patch |
20 |
Patch1: create-srpm-binrepo.patch |
21 |
License: GPL |
22 |
URL: http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/build_system/repsys/ |
23 |
Requires: python-cheetah subversion openssh-clients python-rpm |
24 |
%py_requires -d |
25 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
26 |
BuildArch: noarch |
27 |
|
28 |
%description |
29 |
Tools for Mandriva Linux repository access and management. |
30 |
|
31 |
<http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem> |
32 |
|
33 |
<http://wiki.mandriva.com/en/Development/Packaging/Tools/repsys> |
34 |
|
35 |
|
36 |
%package ldap |
37 |
Group: Development/Other |
38 |
Summary: Repsys plugin to retrieve maintainer information from LDAP |
39 |
Requires: repsys >= 1.6.16 python-ldap |
40 |
|
41 |
%description ldap |
42 |
A Repsys plugin that allows retrieving maintainer information shown in |
43 |
changelogs from a LDAP server. |
44 |
|
45 |
See repsys --help-plugin ldapusers for more information. Also see |
46 |
http://qa.mandriva.com/show_bug.cgi?id=30549 |
47 |
|
48 |
%prep |
49 |
%setup -q -n %{name}-binrepo-svn-%{version} |
50 |
%patch0 -p1 |
51 |
%patch1 -p4 |
52 |
install -m 0644 %_sourcedir/repsys.conf %_builddir/%name-%version |
53 |
|
54 |
%build |
55 |
python setup.py build |
56 |
|
57 |
%install |
58 |
rm -rf %{buildroot} |
59 |
|
60 |
python setup.py install --root=%{buildroot} |
61 |
# Using compile inline since niemeyer's python macros still not available on mdk rpm macros |
62 |
find %{buildroot}%{py_puresitedir} -name '*.pyc' -exec rm -f {} \; |
63 |
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and |
64 |
(sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %{buildroot}%{py_sitedir} |
65 |
|
66 |
mkdir -p %{buildroot}%{_sysconfdir} |
67 |
mkdir -p %{buildroot}%{_datadir}/repsys/ |
68 |
mkdir -p %{buildroot}%{_bindir}/ |
69 |
install -m 0755 %{SOURCE1} %{buildroot}%{_datadir}/repsys/rebrand-mdk |
70 |
install -m 0755 create-srpm %{buildroot}%{_datadir}/repsys/create-srpm |
71 |
install -m 0755 repsys-ssh %{buildroot}%{_bindir}/repsys-ssh |
72 |
install -m 0644 repsys.conf %{buildroot}%{_sysconfdir} |
73 |
|
74 |
%clean |
75 |
rm -rf %{buildroot} |
76 |
|
77 |
%files |
78 |
%defattr(-,root,root) |
79 |
%doc CHANGES repsys-example.conf |
80 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/repsys.conf |
81 |
%{_bindir}/repsys |
82 |
%{_bindir}/repsys-ssh |
83 |
%{_datadir}/repsys |
84 |
%{_mandir}/*/* |
85 |
%{py_puresitedir}/RepSys |
86 |
%exclude %{py_puresitedir}/RepSys/plugins/ldapusers.py* |
87 |
%if %my_py_ver >= 25 |
88 |
%{py_puresitedir}/*.egg-info |
89 |
%endif |
90 |
|
91 |
%files ldap |
92 |
%doc README.LDAP |
93 |
%{py_puresitedir}/RepSys/plugins/ldapusers.py* |
94 |
|