Release and document version 0.10
[services/obs-service-git-buildpackage.git] / packaging / obs-service-git-buildpackage.spec
1 # Set to 0 if "normal release"
2 %define pre_release 0
3
4 %if 0%{?pre_release}
5 %define release_prefix 0pre%{pre_release}.
6 %endif
7
8 Name:           obs-service-git-buildpackage
9 License:        GPL-2.0+
10 Group:          Development/Tools/Building
11 Summary:        Get sources from a repository managed with the git-buildpackage suite
12 Version:        0.10
13 Release:        %{?release_prefix}%{?opensuse_bs:<CI_CNT>.<B_CNT>}%{!?opensuse_bs:1}
14 URL:            http://www.tizen.org
15 Source:         %{name}-%{version}.tar.bz2
16 Requires:       git-buildpackage
17 Requires:       git-buildpackage-rpm >= 0.6.15
18 Requires:       gbp-repocache = %{version}-%{release}
19 Requires:       %{name}-utils = %{version}-%{release}
20 BuildRequires:  python
21 BuildRequires:  python-setuptools
22 %if 0%{?do_unittests}
23 BuildRequires:  python-coverage
24 BuildRequires:  python-nose
25 BuildRequires:  git-buildpackage-rpm
26 %endif
27 BuildArch:      noarch
28
29 %description
30 This is a source service for openSUSE Build Service.
31
32 It supports cloning/updating repo from git and exporting sources and packaging
33 files that are managed with git-buildpackage tools.
34
35
36 %package utils
37 Summary:    Utility fuctions for the GBP OBS source service
38 Group:      Development/Tools/Building
39 Requires:   python >= 2.6
40 Requires:   gbp-repocache = %{version}
41
42 %description utils
43 This package contains generic utility functions for the git-buildpackage OBS
44 source service.
45
46
47 %package -n gbp-repocache
48 Summary:    Git repository cache API
49 Group:      Development/Tools/Building
50 Requires:   git-buildpackage-common
51
52 %description -n gbp-repocache
53 This package provides an implementation and python API of a Git repository
54 cache.
55
56
57 %prep
58 %setup
59
60
61 %build
62 %{__python} setup.py build
63 cp config/git-buildpackage config/obs-service-git-buildpackage.example.config
64
65
66 %if 0%{?do_unittests}
67 %check
68 GIT_AUTHOR_EMAIL=rpmbuild@example.com GIT_AUTHOR_NAME=rpmbuild \
69     GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL \
70     %{__python} setup.py nosetests
71 %endif
72
73
74 %install
75 %{__python} setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix}
76 rm -rf %{buildroot}%{python_sitelib}/*info
77
78
79 %files
80 %defattr(-,root,root,-)
81 %doc COPYING DEPLOYMENT README
82 %doc config/obs-service-git-buildpackage.example.config
83 %dir /usr/lib/obs
84 %dir /usr/lib/obs/service
85 /usr/lib/obs/service/*
86 %{python_sitelib}/obs_service_gbp
87 %dir %{_sysconfdir}/obs
88 %dir %{_sysconfdir}/obs/services
89 %config %{_sysconfdir}/obs/services/*
90
91 %files utils
92 %defattr(-,root,root,-)
93 %doc COPYING
94 %{python_sitelib}/obs_service_gbp_utils
95
96 %files -n gbp-repocache
97 %defattr(-,root,root,-)
98 %doc COPYING
99 %{_bindir}/repocache-adm
100 %{python_sitelib}/gbp_repocache
101 %{python_sitelib}/repocache_adm