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