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 %if "%{fedora}" >= "6"
45 Requires: inotify-tools-devel
50 %if "%{fedora}" >= "6"
51 Requires: libpcap-devel
54 Requires: linuxdoc-tools
62 Requires: mysql-server
64 Requires: ncurses-devel
66 Requires: ocaml-ocamldoc
74 Requires: postgresql-devel
75 Requires: postgresql-python
76 Requires: postgresql-server
78 Requires: python-devel
79 %if "%{fedora}" >= "5"
80 Requires: python-pycurl
81 Requires: python-psycopg2
84 Requires: readline-devel
85 Requires: redhat-rpm-config
103 Requires: xmlsec1-openssl
106 %define debug_package %{nil}
109 This package installs a complete PlanetLab development
110 environment. The default installation consists of all the packages
111 necessary to compile MyPLC.
118 rm -rf $RPM_BUILD_ROOT
119 mkdir -p $RPM_BUILD_ROOT/etc
123 touch $RPM_BUILD_ROOT/etc/myplc-devel-native
126 rm -rf $RPM_BUILD_ROOT
129 if [ -n "$SUDO_USER" ] ; then
130 # Allow user to delete the build directory
131 chown -h -R $SUDO_USER .
132 # Some temporary cdroot files like /var/empty/sshd and
133 # /usr/bin/sudo get created with non-readable permissions.
134 find . -not -perm +0600 -exec chmod u+rw {} \;
135 # Allow user to delete the built RPM(s)
136 chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
146 builduser=$(grep "^build" /etc/passwd | wc -l)
147 if [ $builduser -eq 0 ] ; then
148 groupadd -o -g $gid build;
149 useradd -o -c 'Automated Build' -u $uid -g $gid -n -M -s /bin/bash build;
152 # Allow build user to build certain RPMs as root
153 buildsudo=$(grep "^build.*ALL=(ALL).*NOPASSWD:.*ALL" /etc/sudoers | wc -l)
154 if [ $buildsudo -eq 0 ] ; then
155 echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
160 # 0 = erase, 1 = upgrade
161 if [ $1 -eq 0 ] ; then
162 echo "NOTE: should remove build user from /etc/sudoers"
166 %defattr(-,root,root,-)
167 /etc/myplc-devel-native
170 * Fri Oct 05 2007 Marc E. Fiuczynski <mef@cs.princeton.edu>