1 |
# $Id: daemontools.spec,v 1.2 2008/04/09 13:51:46 slords Exp $ |
# $Id: daemontools.spec,v 1.1 2013/02/06 21:59:42 slords Exp $ |
2 |
|
|
3 |
%define destdir %buildroot |
%define destdir %buildroot |
4 |
%global myhome /usr/local |
%global myhome /usr/local |
29 |
tries again, without losing any data. |
tries again, without losing any data. |
30 |
|
|
31 |
%prep |
%prep |
32 |
%setup -c -n %destdir/package |
%setup -c -n package |
33 |
|
|
34 |
%build |
%build |
|
mkdir -p %destdir%myhome/bin |
|
35 |
cd admin/%name-%version |
cd admin/%name-%version |
36 |
sed -e 's}^parent.*}parent=/package/admin}' \ |
sed -e 's}^parent.*}parent=/package/admin}' \ |
37 |
-e 's} /command/} %destdir/command/}g' \ |
-e 's} /command/} %destdir/command/}g' \ |
51 |
echo gcc -O2 --include /usr/include/errno.h > src/conf-cc |
echo gcc -O2 --include /usr/include/errno.h > src/conf-cc |
52 |
package/compile |
package/compile |
53 |
|
|
54 |
|
cd ../.. |
55 |
|
|
56 |
COMPILER="Compiler: $(gcc -v 2>&1 | tail -1)" |
COMPILER="Compiler: $(gcc -v 2>&1 | tail -1)" |
57 |
HARDWARE="Hardware: $(uname -m)" |
HARDWARE="Hardware: $(uname -m)" |
58 |
LIBRARY="Library: $(rpm -q glibc)" |
LIBRARY="Library: $(rpm -q glibc)" |
79 |
echo "" >> README.rpm |
echo "" >> README.rpm |
80 |
echo "You cannot distribute this rpm publicly" >> README.rpm |
echo "You cannot distribute this rpm publicly" >> README.rpm |
81 |
fi |
fi |
82 |
|
|
83 |
|
%install |
84 |
|
mkdir -p %destdir/%myhome/bin |
85 |
|
mkdir -p %destdir/service |
86 |
|
mkdir -p %destdir/package |
87 |
mkdir -p %destdir/%{_docdir}/%name-%version |
mkdir -p %destdir/%{_docdir}/%name-%version |
88 |
mv README.rpm %destdir/%{_docdir}/%name-%version |
mv README.rpm %destdir/%{_docdir}/%name-%version |
|
mv package/README %destdir/%{_docdir}/%name-%version |
|
|
mv src/{CHANGES,TODO} %destdir/%{_docdir}/%name-%version |
|
|
mkdir -p %destdir/service |
|
89 |
|
|
|
%install |
|
90 |
cd admin/%name-%version |
cd admin/%name-%version |
91 |
|
mv package/README %destdir/%{_docdir}/%name-%version |
92 |
|
mv src/{CHANGES,TODO} %destdir/%{_docdir}/%name-%version |
93 |
package/upgrade |
package/upgrade |
94 |
|
cd ../.. |
95 |
|
|
96 |
|
cp -a admin %destdir/package/ |
97 |
/bin/rm %destdir/package/admin/%name-%version/src/* |
/bin/rm %destdir/package/admin/%name-%version/src/* |
98 |
/bin/rm -r %destdir/package/admin/%name-%version/compile |
/bin/rm -r %destdir/package/admin/%name-%version/compile |
99 |
|
|
|
|
|
100 |
%post |
%post |
101 |
cd /package/admin/%name-%version |
cd /package/admin/%name-%version |
102 |
package/run |
package/run |
143 |
/command/* |
/command/* |
144 |
%myhome/bin/* |
%myhome/bin/* |
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|