2 Packager: PlanetLab Central <support@planet-lab.org>
3 Distribution: PlanetLab 4.0
4 URL: http://svn.planet-lab.org/svn/MyPLC
6 Summary: PlanetLab Central (PLC) Development Environment
7 Name: myplc-devel-native
9 Release: 2%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11 Group: Development/Tools
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16 # group this according to the requirements of the different packages we build
17 Requires: beecrypt-devel
29 Requires: docbook-utils-pdf
38 Requires: glibc-common
44 Requires: inotify-tools-devel
48 Requires: libpcap-devel
50 Requires: linuxdoc-tools
58 Requires: mysql-server
60 Requires: ncurses-devel
62 Requires: ocaml-ocamldoc
70 Requires: postgresql-devel
71 Requires: postgresql-python
72 Requires: postgresql-server
74 Requires: python-devel
75 Requires: python-pycurl
76 Requires: python-psycopg2
78 Requires: readline-devel
79 Requires: redhat-rpm-config
97 Requires: xmlsec1-openssl
100 %define debug_package %{nil}
103 This package installs a complete PlanetLab development
104 environment. The default installation consists of all the packages
105 necessary to compile MyPLC.
112 rm -rf $RPM_BUILD_ROOT
113 mkdir -p $RPM_BUILD_ROOT/etc
117 touch $RPM_BUILD_ROOT/etc/myplc-devel-native
120 rm -rf $RPM_BUILD_ROOT
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}
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;
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
154 # 0 = erase, 1 = upgrade
155 if [ $1 -eq 0 ] ; then
156 echo "NOTE: should remove build user from /etc/sudoers"
160 %defattr(-,root,root,-)
161 /etc/myplc-devel-native
164 * Fri Oct 05 2007 Marc E. Fiuczynski <mef@cs.princeton.edu>