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