Remove gen-sites-xml.py, gen-slices-xml-05.py, and
[myplc.git] / myplc-devel-native.spec
1 Vendor: PlanetLab
2 Packager: PlanetLab Central <support@planet-lab.org>
3 Distribution: PlanetLab 4.0
4 URL: http://svn.planet-lab.org/svn/MyPLC
5
6 Summary: PlanetLab Central (PLC) Development Environment
7 Name: myplc-devel-native
8 Version: 0.1
9 Release: 2%{?pldistro:.%{pldistro}}%{?date:.%{date}}
10 License: PlanetLab
11 Group: Development/Tools
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
14 AutoReqProv: no
15
16 # group this according to the requirements of the different packages we build
17 Requires: beecrypt-devel
18 Requires: bzip2
19 Requires: coreutils
20 Requires: cpio
21 Requires: createrepo
22 Requires: curl
23 Requires: curl-devel
24 Requires: cvs
25 Requires: db4-devel
26 Requires: dev
27 Requires: diffutils
28 Requires: dnsmasq
29 Requires: docbook-utils-pdf
30 Requires: dosfstools
31 Requires: doxygen
32 Requires: expat-devel
33 Requires: expect
34 Requires: findutils
35 Requires: gcc-c++
36 Requires: gd
37 Requires: glibc
38 Requires: glibc-common
39 Requires: gnupg
40 Requires: gperf
41 Requires: graphviz
42 Requires: gzip
43 Requires: httpd
44 Requires: inotify-tools-devel
45 Requires: iptables
46 Requires: less
47 Requires: libpcap
48 Requires: libpcap-devel
49 Requires: libtool
50 Requires: linuxdoc-tools
51 Requires: mailx
52 Requires: make
53 Requires: mkisofs
54 Requires: mod_python
55 Requires: mod_ssl
56 Requires: mysql
57 Requires: mysql-devel
58 Requires: mysql-server
59 Requires: nasm
60 Requires: ncurses-devel
61 Requires: ocaml
62 Requires: ocaml-ocamldoc
63 Requires: openssh
64 Requires: openssl
65 Requires: php
66 Requires: php-devel
67 Requires: php-gd
68 Requires: php-pgsql
69 Requires: postgresql
70 Requires: postgresql-devel
71 Requires: postgresql-python
72 Requires: postgresql-server
73 Requires: python
74 Requires: python-devel
75 Requires: python-pycurl
76 Requires: python-psycopg2
77 Requires: PyXML
78 Requires: readline-devel
79 Requires: redhat-rpm-config
80 Requires: rpm
81 Requires: rpm-build
82 Requires: rpm-devel
83 Requires: rsync
84 Requires: sendmail
85 Requires: sendmail-cf
86 Requires: sharutils
87 Requires: SOAPpy
88 Requires: sudo
89 Requires: subversion
90 Requires: tar
91 Requires: tetex-latex
92 Requires: time
93 Requires: vconfig
94 Requires: vixie-cron
95 Requires: wget
96 Requires: xmlsec1
97 Requires: xmlsec1-openssl
98 Requires: yum
99
100 %define debug_package %{nil}
101
102 %description
103 This package installs a complete PlanetLab development
104 environment. The default installation consists of all the packages
105 necessary to compile MyPLC.
106
107 %prep
108 %setup -q
109
110 %build
111
112 rm -rf $RPM_BUILD_ROOT
113 mkdir -p $RPM_BUILD_ROOT/etc
114
115 %install
116
117 touch $RPM_BUILD_ROOT/etc/myplc-devel-native
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 # If run under sudo
123 if [ -n "$SUDO_USER" ] ; then
124     # Allow user to delete the build directory
125     chown -h -R $SUDO_USER .
126     # Some temporary cdroot files like /var/empty/sshd and
127     # /usr/bin/sudo get created with non-readable permissions.
128     find . -not -perm +0600 -exec chmod u+rw {} \;
129     # Allow user to delete the built RPM(s)
130     chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
131 fi
132
133 %pre
134
135 %post
136
137 uid=2000
138 gid=2000
139
140 builduser=$(grep "^build" /etc/passwd | wc -l)
141 if [ $builduser -eq 0 ] ; then
142         groupadd -o -g $gid build;
143         useradd -o -c 'Automated Build' -u $uid -g $gid -n -M -s /bin/bash build;
144 fi
145
146 # Allow build user to build certain RPMs as root
147 buildsudo=$(grep "^build.*ALL=(ALL).*NOPASSWD:.*ALL"  /etc/sudoers | wc -l)
148 if [ $buildsudo -eq 0 ] ; then
149         echo "build   ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
150 fi
151
152
153 %preun
154 # 0 = erase, 1 = upgrade
155 if [ $1 -eq 0 ] ; then
156         echo "NOTE: should remove build user from /etc/sudoers"
157 fi
158
159 %files
160 %defattr(-,root,root,-)
161 /etc/myplc-devel-native
162
163 %changelog
164 * Fri Oct 05 2007 Marc E. Fiuczynski <mef@cs.princeton.edu>
165 - Initial build.