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