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: 954f612ed3c4d937d92090171f4eb4ed
12 Source2: %{name}.sysconfig
13 URL: http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.new/
14 BuildRequires: rpm-pythonprov
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/bin/getgid
21 Requires(pre): /usr/sbin/groupadd
22 Requires(pre): /usr/sbin/useradd
25 Requires: python-pld-builder = %{version}-%{release}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sysconfdir /etc/pld-builder
31 %define _datadir /usr/share/%{name}
34 PLD RPM builder environment. This is the freshest "new" builder.
36 Other new and older attempts can be found from:
37 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder/
38 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.old/
39 http://cvs.pld-linux.org/cgi-bin/cvsweb/builder_ng/
41 %description -l pl.UTF-8
42 Środowisko budowniczego pakietów RPM dla PLD. To jest najnowszy "nowy"
45 Inne nowe i starsze próby można znaleźć pod:
46 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder/
47 http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.old/
48 http://cvs.pld-linux.org/cgi-bin/cvsweb/builder_ng/
50 %package -n python-pld-builder
52 Summary(pl.UTF-8): Budowniczy PLD
53 Group: Development/Building
54 %pyrequires_eq python-modules
56 %description -n python-pld-builder
57 PLD Builder Python code.
59 %description -n python-pld-builder -l pl.UTF-8
60 Kod pythonowy budowniczego PLD.
63 Summary: PLD Builder client
64 Summary(pl.UTF-8): Klient budowniczych PLD
65 Group: Development/Building
69 This is the client to send build requests to builders, it is usually
70 referred as STBR (Send To Builder Request).
72 %description client -l pl.UTF-8
73 To jest klient do wysyłania zleceń na buildery, zwykle określanych
74 jako STBR (Send To Builder Request).
77 %setup -q -n %{name}.new
79 mv jak-wysy?a?-zlecenia.txt jak-wysylac-zlecenia.txt
82 s,~/pld-builder.new/,%{_sharedstatedir}/%{name}/,
83 /^conf_dir/s,=.*,= "%{_sysconfdir}/",
87 %{__sed} -i -e 's,pld-linux\.org,example.org,g' config/builder.conf
93 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{_bindir}
96 install client/make-request.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-make-request
99 install -d $RPM_BUILD_ROOT%{py_scriptdir}/PLD_Builder
100 cp -a PLD_Builder/*.py[co] $RPM_BUILD_ROOT%{py_scriptdir}/PLD_Builder
103 install -d $RPM_BUILD_ROOT%{_sysconfdir}
104 cp -a config/{rsync-passwords,*.conf} $RPM_BUILD_ROOT%{_sysconfdir}
105 install -d $RPM_BUILD_ROOT%{_datadir}/{bin,admin}
106 for a in bin/*.sh; do
108 # s,cd ~/pld-builder.new,cd %{py_scriptdir},
109 /cd ~\/pld-builder.new/d
110 s,python \(PLD_Builder.*.py\),python %{py_scriptdir}/\1c,
111 ' $a > $RPM_BUILD_ROOT%{_datadir}/bin/$(basename $a)
113 cp -a admin/*.sh $RPM_BUILD_ROOT%{_datadir}/admin
116 install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name}/{spool/{buildlogs,builds,ftp,notify},lock,www/{s,}rpms},/etc/{sysconfig,rc.d/init.d}}
118 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pld-builder
119 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pld-builder
122 rm -rf $RPM_BUILD_ROOT
125 %groupadd -g 181 pld-builder
126 %useradd -u 181 -g pld-builder -c "srpms builder" srpms_builder
127 %useradd -u 182 -g pld-builder -c "bin builder" bin_builder
128 %useradd -u 183 -g daemon -c "ftpac" ftpac
131 /sbin/chkconfig --add %{name}
132 %service %{name} restart
135 if [ "$1" = "0" ]; then
136 %service %{name} stop
137 /sbin/chkconfig --del %{name}
141 if [ "$1" = "0" ]; then
142 %userremove srpms_builder
143 %userremove bin_builder
145 %groupremove pld-builder
149 %defattr(644,root,root,755)
152 %lang(pl) %doc jak-to-dziala.txt jak-wysylac-zlecenia.txt
155 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
159 %attr(755,root,root) %{_datadir}/bin/*
160 %dir %{_datadir}/admin
161 %attr(755,root,root) %{_datadir}/admin/*
163 %dir %{_sharedstatedir}/%{name}
164 %dir %attr(775,root,pld-builder) %{_sharedstatedir}/%{name}/spool
165 %dir %attr(775,root,pld-builder) %{_sharedstatedir}/%{name}/spool/buildlogs
166 %dir %{_sharedstatedir}/%{name}/spool/builds
167 %dir %{_sharedstatedir}/%{name}/spool/ftp
168 %dir %attr(775,root,pld-builder) %{_sharedstatedir}/%{name}/spool/notify
169 %dir %attr(775,root,pld-builder) %{_sharedstatedir}/%{name}/lock
170 %dir %{_sharedstatedir}/%{name}/www
171 %dir %{_sharedstatedir}/%{name}/www/rpms
172 %dir %{_sharedstatedir}/%{name}/www/srpms
174 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pld-builder
175 %attr(754,root,root) /etc/rc.d/init.d/pld-builder
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/%{name}-make-request
181 %files -n python-pld-builder
182 %defattr(644,root,root,755)
183 %{py_scriptdir}/PLD_Builder