]> git.pld-linux.org Git - packages/git-core-slug.git/blob - git-core-slug.spec
- rel 6; parallelize fetching, cloning and checking out
[packages/git-core-slug.git] / git-core-slug.spec
1 %define         module  git_slug
2 Summary:        Tools to interact with PLD git repositories
3 Summary(pl.UTF-8):      Narzędzia do pracy z repozytoriami gita w PLD
4 Name:           git-core-slug
5 Version:        0.13.4
6 Release:        6
7 License:        GPL v2
8 Group:          Development/Building
9 Source0:        https://github.com/draenog/slug/tarball/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5:  b6e6f24006b0a56378e91c0bc8daf5b1
11 Source1:        slug_watch.init
12 Source2:        crontab
13 Source3:        slug_watch.sysconfig
14 Source4:        slug_watch-cron
15 Patch0:         %{name}-packet-ref.patch
16 Patch1:         %{name}-parallel.patch
17 URL:            https://github.com/draenog/slug
18 BuildRequires:  asciidoc
19 BuildRequires:  docbook-dtd45-xml
20 BuildRequires:  python3-modules >= 1:3.3.0
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.228
23 BuildRequires:  xmlto
24 Requires:       git-core
25 Requires:       python3-modules
26 Suggests:       openssh-clients
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Python tools to interact with PLD git repositories.
31
32 %description -l pl.UTF-8
33 Narzędzia w Pythonie do pracy z repozytoriami gita w PLD.
34
35 %package watch
36 Summary:        Daemon to update Refs repository for git-slug
37 Summary(pl.UTF-8):      Demon uaktualniający repozytorium Refs dla git-slug
38 Group:          Development/Building
39 Requires(post,preun):   /sbin/chkconfig
40 Requires:       git-core-slug
41 Requires:       pld-gitolite
42 Requires:       python3-pyinotify
43 Requires:       rc-scripts
44 Suggests:       crondaemon
45
46 %description watch
47 Daemon to update Refs repository for git-slug. It is to be run on PLD
48 gitolite server.
49
50 %description watch -l pl.UTF-8
51 Demon uaktualniający repozytorium Refs dla git-slug. Jest przeznaczony
52 do uruchamiania na serwerze gitolite PLD.
53
54 %prep
55 %setup -qc
56 mv draenog-slug-*/* .
57 %patch0 -p1
58 %patch1 -p1
59
60 %build
61 %{__python3} setup.py build
62 %{__make} man
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 %{__python3} setup.py install \
67         --install-data=/home/services/git \
68         --skip-build \
69         --optimize=2 \
70         --root=$RPM_BUILD_ROOT
71
72 %{__make} man-install \
73         DESTDIR=$RPM_BUILD_ROOT
74
75 install -d $RPM_BUILD_ROOT%{_libdir}/git-core
76 ln -s %{_bindir}/slug.py $RPM_BUILD_ROOT%{_libdir}/git-core/git-pld
77 echo ".so slug.py.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
78
79 install -Dp %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
80 install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
81 cp -rp post-receive.python.d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
82 install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
83 touch $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
84
85 install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/slug_watch
86 install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
87 install -Dp %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post watch
93 /sbin/chkconfig --add slug_watch
94 %service slug_watch restart
95
96 %preun watch
97 if [ "$1" = "0" ]; then
98         %service -q slug_watch stop
99         /sbin/chkconfig --del slug_watch
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc HOWTO
105 %attr(755,root,root) %{_bindir}/slug.py
106 %{_libdir}/git-core/git-pld
107 %{_mandir}/man1/git-pld.1*
108 %{_mandir}/man1/slug.py.1*
109 %{py3_sitescriptdir}/%{module}
110 %{py3_sitescriptdir}/git_core_slug-*.egg-info
111
112 %files watch
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_bindir}/slug_watch
115 %attr(755,root,root) %{_bindir}/slug_watch-cron
116 %attr(754,root,root) /etc/rc.d/init.d/slug_watch
117 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/slug_watch
118 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/slug_watch
119 %{py3_sitescriptdir}/Daemon
120
121 %defattr(644,git,git,755)
122 %attr(755,git,git) /home/services/git/adc/bin/trash
123 %attr(755,git,git) /home/services/git/adc/bin/move
124 /home/services/git/adc/bin/copy
125 %dir /home/services/git/.gitolite/hooks/common/post-receive.python.d
126 /home/services/git/.gitolite/hooks/common/post-receive.python.d/slug_hook.py
127 %dir /home/services/git/watchdir
128 %dir /home/services/git/Refs
This page took 0.041047 seconds and 3 git commands to generate.