1 %define module git_slug
2 Summary: Tools to interact with PLD Linux git repositories
3 Summary(pl.UTF-8): Narzędzia do pracy z repozytoriami gita w PLD Linuksa
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
13 Source3: slug_watch.sysconfig
14 Source4: slug_watch-cron
15 Patch0: %{name}-git.patch
16 URL: https://github.com/draenog/slug
17 BuildRequires: asciidoc
18 BuildRequires: docbook-dtd45-xml
19 BuildRequires: git-core >= 2.7.1-3
20 BuildRequires: python3-modules >= 1:3.3.0
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.714
25 Requires: python3-modules
26 Suggests: openssh-clients
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define gitcoredir %(git --exec-path)
33 Python tools to interact with PLD Linux git repositories.
35 %description -l pl.UTF-8
36 Narzędzia w Pythonie do pracy z repozytoriami gita w PLD.
39 Summary: Daemon to update Refs repository for git-slug
40 Summary(pl.UTF-8): Demon uaktualniający repozytorium Refs dla git-slug
41 Group: Development/Building
42 Requires(post,preun): /sbin/chkconfig
43 Requires: git-core-slug
44 Requires: pld-gitolite
45 Requires: python3-pyinotify
50 Daemon to update Refs repository for git-slug. It is to be run on PLD
53 %description watch -l pl.UTF-8
54 Demon uaktualniający repozytorium Refs dla git-slug. Jest przeznaczony
55 do uruchamiania na serwerze gitolite PLD.
67 rm -rf $RPM_BUILD_ROOT
69 --install-data=/home/services/git \
71 %{__make} man-install \
72 DESTDIR=$RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT%{gitcoredir}
75 ln -s %{_bindir}/slug.py $RPM_BUILD_ROOT%{gitcoredir}/git-pld
76 echo ".so slug.py.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
78 install -Dp %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
79 install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
80 cp -rp post-receive.python.d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
81 install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
82 touch $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
84 install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/slug_watch
85 install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
86 install -Dp %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}
89 rm -rf $RPM_BUILD_ROOT
92 /sbin/chkconfig --add slug_watch
93 %service slug_watch restart
96 if [ "$1" = "0" ]; then
97 %service -q slug_watch stop
98 /sbin/chkconfig --del slug_watch
102 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_bindir}/slug.py
105 %{gitcoredir}/git-pld
106 %{_mandir}/man1/git-pld.1*
107 %{_mandir}/man1/slug.py.1*
108 %{py3_sitescriptdir}/%{module}
109 %{py3_sitescriptdir}/git_core_slug-*.egg-info
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_bindir}/slug_watch
114 %attr(755,root,root) %{_bindir}/slug_watch-cron
115 %attr(754,root,root) /etc/rc.d/init.d/slug_watch
116 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/slug_watch
117 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/slug_watch
118 %{py3_sitescriptdir}/Daemon
120 %defattr(644,git,git,755)
121 %attr(755,git,git) /home/services/git/adc/bin/trash
122 %attr(755,git,git) /home/services/git/adc/bin/move
123 /home/services/git/adc/bin/copy
124 %dir /home/services/git/.gitolite/hooks/common/post-receive.python.d
125 /home/services/git/.gitolite/hooks/common/post-receive.python.d/slug_hook.py
126 %dir /home/services/git/watchdir
127 %dir /home/services/git/Refs