You are not logged in.
Hello again,
I'd like to know how to optimize my system by rebuilding installed (and only installed except builddeps perhaps) packages using makepkg or makeworld.
Are there some scripts or ready solutions?
Thanks in advance.
Offline
Doesn't makeworld do that already as long as you have changed your build options in /etc/makepkg.conf ?
fck art, lets dance.
Offline
Doesn't makeworld do that already as long as you have changed your build options in /etc/makepkg.conf ?
Could you please specify which options you mean?
Offline
For instance changing the default from
export CFLAGS="-march=i686 -O2 -pipe"
to
export CFLAGS="-march=pentium4 -O1 -pipe"
The gentoo wiki has everything you ever wanted to know about compiler options here http://gentoo-wiki.com/CFLAGS
fck art, lets dance.
Offline
For instance changing the default from
export CFLAGS="-march=i686 -O2 -pipe"
to
export CFLAGS="-march=pentium4 -O1 -pipe"
The gentoo wiki has everything you ever wanted to know about compiler options here http://gentoo-wiki.com/CFLAGS
You misunderstood me. I know about the CFLAGS and the likes, these are already configured.
What I want to do is to rebuild from source all packages I've INSTALLED with pacman. In other word I'd like to install from source what I already have installed in binary. If I do makeworld it will build entire group in ABS tree. I don't think this is necessary. I ONLY want to build and reinstall the packages that are installed on my system. Doing this manually with makepkg is boring.
Offline
Usage: /usr/bin/makeworld [options] <destdir> <category> [category]
ok some example:
this is for custom packages.
cd /var/abs
mkdir my-pkgbuild
mkdir my-packages
cp -R /var/abs/office/acroread /var/abs/my-pkgbuild
cp -R /var/abs/network/firefox /var/abs/my-pkgbuild
in /var/abs
makeworld -c my-packages my-pkgbuild
2nd example:
this is for all base packages...
cd /var/abs
mkdir my-package
makeworld -c my-packages base
3th example:
this is for extra/multimedia-plugins...
cd /var/abs
mkdir my-package
makeworld -c my-packages extra/multimedia-plugins
4th example:
this is for base & extra/editors & kernels...
cd /var/abs
mkdir my-package
makeworld -c my-packages base extra/editors kernels
Offline
fck art, lets dance.
Offline
Here's how I rebuild every package installed on my system, except those not found in aur tree, and those already installed as source
#!/bin/bash
#
# Update abs tree and pacman db
#
abs
pacman -Sy
#
# Get list of installed packages
#
pkglist=`pacman -Q | cut -d' ' -f1 | paste -s`
#
# Locate each package in abs tree
#
for pkg in $pkglist; do
search=`find /var/abs/ -type d -name $pkg`
echo
echo "Searching for: $pkg"
echo "Result: $search"
# Add it to makelist or norebuildlist
pkgbuild="$search/PKGBUILD"
if [ -f "$pkgbuild" ] ; then
# Check if its already installed from source
source=`srcpac -Qi $pkg | grep 'Source :'`
if [ "$source" = "Source : No" ] ; then
makelist="$makelist $pkg"
else
echo "Package was already built from source..."
norebuildlist="$norebuildlist $pkg"
fi
else
norebuildlist="$norebuildlist $pkg"
fi
done
#
# Show list of packages not found in abs
#
echo
echo "Packages that won't be rebuilt:"
echo "-------------------------------"
echo
echo "$norebuildlist"
#
# Show list of packages to build
#
echo
echo "Packages to build:"
echo "------------------"
echo
echo "$makelist"
#
# Write to treebuildlist file
#
echo $makelist > treebuildlist
echo
echo "...wrote list to file: treebuildlist"
#
# Build the packages using aurbuild
#
echo
echo "Starting build..."
echo "-----------------"
echo
srcpac -Sb $makelist
echo
echo "-----------------------------------------------------------"
echo " REBUILD COMPLETE!"
echo "-----------------------------------------------------------"
echo
Offline