2 Summary: PLD RPM builder environment
3 Summary(pl.UTF-8): Środowisko budowniczego pakietów RPM dla PLD
8 Group: Development/Building
9 Source0: %{name}.new-%{snap}.tar.bz2
10 # Source0-md5: 1346166c8e0a7dacd5152e49f8648409
12 Source2: %{name}.sysconfig
13 URL: http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.new/
15 BuildRequires: rpmbuild(macros) >= 1.268
16 BuildRequires: sed >= 4.0
17 Requires(post,preun): /sbin/chkconfig
18 Requires(postun): /usr/sbin/userdel
19 Requires(pre): /bin/id
20 Requires(pre): /usr/sbin/useradd
22 Requires: python-pld-builder = %{version}-%{release}
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _sysconfdir /etc/pld-builder
28 %define _datadir /usr/share/%{name}
31 PLD RPM builder environment. This is the freshest "new" builder.
33 Other new and older attempts can be found from:
34 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder/
35 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.old/
36 http://cvs.pld-linux.org/cgi-bin/cvsweb/builder_ng/
38 %description -l pl.UTF-8
39 Środowisko budowniczego pakietów RPM dla PLD. To jest najnowszy "nowy"
42 Inne nowe i starsze próby można znaleźć pod:
43 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder/
44 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.old/
45 http://cvs.pld-linux.org/cgi-bin/cvsweb/builder_ng/
47 %package -n python-pld-builder
49 Summary(pl.UTF-8): Budowniczy PLD
50 Group: Development/Building
51 %pyrequires_eq python-modules
53 %description -n python-pld-builder
54 PLD Builder Python code.
56 %description -n python-pld-builder -l pl.UTF-8
57 Kod pythonowy budowniczego PLD.
60 Summary: PLD Builder client
61 Summary(pl.UTF-8): Klient budowniczych PLD
62 Group: Development/Building
66 This is the client to send build requests to builders, it is usually
67 referred as STBR (Send To Builder Request).
69 %description client -l pl.UTF-8
70 To jest klient do wysyłania zleceń na buildery, zwykle określanych
71 jako STBR (Send To Builder Request).
74 %setup -q -n %{name}.new
76 mv jak-wysy?a?-zlecenia.txt jak-wysylac-zlecenia.txt
79 s,~/pld-builder.new/,%{_sharedstatedir}/%{name}/,
80 /^conf_dir/s,=.*,= "%{_sysconfdir}/",
88 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT%{_bindir}
91 install client/make-request.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-make-request
94 install -d $RPM_BUILD_ROOT%{py_scriptdir}/PLD_Builder
95 cp -a PLD_Builder/*.py[co] $RPM_BUILD_ROOT%{py_scriptdir}/PLD_Builder
98 install -d $RPM_BUILD_ROOT%{_sysconfdir}
99 cp -a config/{rsync-passwords,*.conf} $RPM_BUILD_ROOT%{_sysconfdir}
100 install -d $RPM_BUILD_ROOT%{_datadir}/{bin,admin}
101 for a in bin/*.sh; do
103 # s,cd ~/pld-builder.new,cd %{py_scriptdir},
104 /cd ~\/pld-builder.new/d
105 s,python \(PLD_Builder.*.py\),python %{py_scriptdir}/\1c,
106 ' $a > $RPM_BUILD_ROOT%{_datadir}/bin/$(basename $a)
108 cp -a admin/*.sh $RPM_BUILD_ROOT%{_datadir}/admin
111 install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name}/{spool/{builds,ftp},lock,www/{s,}rpms},/etc/{sysconfig,rc.d/init.d}}
113 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pld-builder
114 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pld-builder
117 rm -rf $RPM_BUILD_ROOT
120 %useradd -u 181 -g daemon -c "srpms builder" srpms_builder
121 %useradd -u 182 -g daemon -c "bin builder" bin_builder
122 %useradd -u 183 -g daemon -c "ftpac" ftpac
125 /sbin/chkconfig --add %{name}
126 %service %{name} restart
129 if [ "$1" = "0" ]; then
130 %service %{name} stop
131 /sbin/chkconfig --del %{name}
135 if [ "$1" = "0" ]; then
136 %userremove srpms_builder
137 %userremove bin_builder
142 %defattr(644,root,root,755)
145 %lang(pl) %doc jak-to-dziala.txt jak-wysylac-zlecenia.txt
148 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
152 %attr(755,root,root) %{_datadir}/bin/*
153 %dir %{_datadir}/admin
154 %attr(755,root,root) %{_datadir}/admin/*
156 %dir %{_sharedstatedir}/%{name}
157 %dir %{_sharedstatedir}/%{name}/spool
158 %dir %{_sharedstatedir}/%{name}/spool/builds
159 %dir %{_sharedstatedir}/%{name}/spool/ftp
160 %dir %{_sharedstatedir}/%{name}/lock
161 %dir %{_sharedstatedir}/%{name}/www
162 %dir %{_sharedstatedir}/%{name}/www/rpms
163 %dir %{_sharedstatedir}/%{name}/www/srpms
165 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pld-builder
166 %attr(754,root,root) /etc/rc.d/init.d/pld-builder
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/%{name}-make-request
172 %files -n python-pld-builder
173 %defattr(644,root,root,755)
174 %{py_scriptdir}/PLD_Builder