-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtagopsdb.spec
79 lines (58 loc) · 1.94 KB
/
tagopsdb.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
%define _topdir %(pwd)
%define _tmppath %{_topdir}
%define _builddir %{_tmppath}
%define _buildrootdir %{_tmppath}
%define _rpmtopdir %{_topdir}
%define _sourcedir %{_rpmtopdir}
%define _specdir %{_topdir}
%define _rpmdir %{_topdir}
%define _srcrpmdir %{_topdir}
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%if 0%{?rhel} >= 6
%global __python python
%global pybase %{__python}
%global tagbase TAGpython
%else
%global __python python2.6
%global pybase python26
%global tagbase TAGpython26
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define __version %(%{__python} setup.py --version)
%define _pkg_version %(echo %{__version} | awk -F"-" '{print $1}')
%define _pkg_release %(echo %{__version} | awk -F"-" '{print "0." $2}')
%if "%{_pkg_release}" == "0."
%define _pkg_release 1
%endif
Name: %{tagbase}-tagopsdb
Version: %{_pkg_version}
Release: %{_pkg_release}%{?dist}
Summary: Python interface to TagOpsDB database
Group: Development/Languages
License: Apache License, Version 2.0
URL: None
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: %{pybase}-devel
Requires: %{tagbase}-oursql
Requires: %{tagbase}-sqlalchemy
%description
A Python library that contains various methods used to access the information
in the TagOpsDB library.
%build
echo "Sitelib is %{python_sitelib}"
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
# Note: use --install-scripts <path> for alternate location of programs
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
%{__python} setup.py clean --all
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%{python_sitelib}/*
%changelog
* Wed Jun 27 2012 Kenneth Lareau <klareau tagged com> - 0.1.0-1
- Initial version