]> git.pld-linux.org Git - SPECS.git/blob - git-core-slug.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / git-core-slug.spec
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
4 Name:           git-core-slug
5 Version:        0.13.4
6 Release:        21
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}-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
23 BuildRequires:  xmlto
24 Requires:       git-core
25 Requires:       python3-modules
26 Suggests:       openssh-clients
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         gitcoredir      %(git --exec-path)
31
32 %description
33 Python tools to interact with PLD Linux git repositories.
34
35 %description -l pl.UTF-8
36 Narzędzia w Pythonie do pracy z repozytoriami gita w PLD.
37
38 %package watch
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
46 Requires:       rc-scripts
47 Suggests:       crondaemon
48
49 %description watch
50 Daemon to update Refs repository for git-slug. It is to be run on PLD
51 gitolite server.
52
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.
56
57 %prep
58 %setup -qc
59 mv draenog-slug-*/* .
60 %patch0 -p1
61
62 %build
63 %py3_build
64 %{__make} man
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 %py3_install \
69         --install-data=/home/services/git \
70
71 %{__make} man-install \
72         DESTDIR=$RPM_BUILD_ROOT
73
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
77
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}
83
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}
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post watch
92 /sbin/chkconfig --add slug_watch
93 %service slug_watch restart
94
95 %preun watch
96 if [ "$1" = "0" ]; then
97         %service -q slug_watch stop
98         /sbin/chkconfig --del slug_watch
99 fi
100
101 %files
102 %defattr(644,root,root,755)
103 %doc HOWTO
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
110
111 %files watch
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
119
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
This page took 1.048338 seconds and 3 git commands to generate.