[PyKDE] Root vs. non-root builds and RPMS

Antonio Cavallo cavallo at casa.darktech.org
Fri Aug 23 09:46:00 BST 2002


I've posted few hours/day ago some spec file to build a rpm pyqt and sip
distro but i forgotten to explain better them;-)

Quick recipe to build an rpm as non-root:


export BDIR=$HOME/usr/src/packages
mkdir -p $BDIR/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p $BDIR/RPMS/{athlon,i386,i486,i586,i686,noarch}


# modify (!) and save the file attached as $HOME/.rpmmacros:
  * change the %_tmppath pointing to an existant (!) directory
  * %_topdir should point to $BDIR


# Then move the spec file i've posted under $BDIR/SPECS, the pyqt and sip
(snapshoot) under $BDIR/SOURCES

# Go into $BDIR/SPECS and:

rpm -ba sip-xxx.spec

# As root (you should be root for install it)
rpm -i $BDIR/RPMS/i386/sip-xxx.i386.rpm

# Repeat the same (as non root) for pyqt.


i hope this will help to build better rpms (i hope this will help the
mantainer to reduce the overhead): to modify for any other pyqt version is
simple as changing the file list (and eventually the source dirs inside
the specs)

aloha,
cav

ps. I've put into the sip/pyqt rpm two define on the top:

%define python_site    %(echo `python -c "import sys; print (sys.prefix +
'/lib/python' + sys.version[:3] + '/site-packages/')"`)
%define python_include %(echo `python -c "import sys; print (sys.prefix +
'/include/python' + sys.version[:3] )"`)

These are defined at compile time, matching the python installed on the
system (or user installed version).

pps. there are more sofisticated tecniques to create a complete user self
contained system (custome python different from teh system) based on rpm,
but i never had time to fix it well, so let me know if someone is
interestd.

-------------- next part --------------
%packager       Antonio Cavallo
%distribution   cavallinux
%vendor         none
%_topdir        /home/users/cavallo/usr/src/packages
%_tmppath       /var/tmp/cavallorpm
%_rpmtopdir     %{_topdir}/%{name}



More information about the PyQt mailing list