]> git.pld-linux.org Git - packages/git-core-slug.git/blob - git-core-slug.spec
ae1edfa43312e98a54ac8571ab9f8d31b8c7982a
[packages/git-core-slug.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.14
6 Release:        3
7 License:        GPL v2
8 Group:          Development/Building
9 Source0:        %{name}-%{version}.tar.gz
10 # Source0-md5:  94d40c83999c0ea1d085fb436beede19
11 Source1:        slug_watch.init
12 Source2:        crontab
13 Source3:        slug_watch.sysconfig
14 Source4:        slug_watch-cron
15 URL:            https://git.pld-linux.org/gitweb.cgi/?p=projects/git-slug.git;a=summary
16 BuildRequires:  asciidoc
17 BuildRequires:  docbook-dtd45-xml
18 BuildRequires:  git-core >= 2.7.1-3
19 BuildRequires:  python3-modules >= 1:3.3.0
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 BuildRequires:  xmlto
23 Requires:       git-core
24 Requires:       python3-modules
25 Suggests:       openssh-clients
26 Suggests:       python3-rpm
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 -q
59
60 %build
61 %py3_build
62 %{__make} man
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 %py3_install \
67         --install-data=/home/services/git \
68
69 %{__make} man-install \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 install -d $RPM_BUILD_ROOT%{gitcoredir}
73 ln -s %{_bindir}/slug.py $RPM_BUILD_ROOT%{gitcoredir}/git-pld
74 echo ".so slug.py.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
75
76 install -Dp %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
77 install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
78 cp -rp post-receive.python.d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
79 install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
80 touch $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
81
82 install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/slug_watch
83 install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
84 install -Dp %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %post watch
90 /sbin/chkconfig --add slug_watch
91 %service slug_watch restart
92
93 %preun watch
94 if [ "$1" = "0" ]; then
95         %service -q slug_watch stop
96         /sbin/chkconfig --del slug_watch
97 fi
98
99 %files
100 %defattr(644,root,root,755)
101 %doc HOWTO
102 %attr(755,root,root) %{_bindir}/slug.py
103 %{gitcoredir}/git-pld
104 %{_mandir}/man1/git-pld.1*
105 %{_mandir}/man1/slug.py.1*
106 %{py3_sitescriptdir}/%{module}
107 %{py3_sitescriptdir}/git_core_slug-*.egg-info
108
109 %files watch
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_bindir}/slug_watch
112 %attr(755,root,root) %{_bindir}/slug_watch-cron
113 %attr(754,root,root) /etc/rc.d/init.d/slug_watch
114 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/slug_watch
115 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/slug_watch
116 %{py3_sitescriptdir}/Daemon
117
118 %defattr(644,git,git,755)
119 %attr(755,git,git) /home/services/git/adc/bin/trash
120 %attr(755,git,git) /home/services/git/adc/bin/move
121 /home/services/git/adc/bin/copy
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
This page took 0.050928 seconds and 2 git commands to generate.