Setting up your own package repository is probably the easiest in Arch Linux compared to other Linux Distros. I’m going to jot down what I did for the Unity For Arch Linux Repository that I created. This is a generic set of instructions and will have to adapted for different environments.
- Create all the packages that you want to host in the repository (
*.pkg.tar.xz
files). Lets assume that all the compiled pacakages are in the directory BUILD-DIR. - Create a directory structure for your packages.
mkdir ~/repo-dir
mkdir ~/repo-dir/x86_64
mkdir ~/repo-dir/i686
*.pkg.tar.xz
files in to appropriate directories.
find BUILD-DIR -name *x86_64.pkg.tar.xz -exec cp '{}' ~/repo-dir/x86_64/ \;
find BUILD-DIR -name *i686.pkg.tar.xz -exec cp '{}' ~/repo-dir/i686/ \;
find BUILD-DIR -name *any.pkg.tar.xz -exec cp '{}' ~/repo-dir/x86_64/ \;
find BUILD-DIR -name *any.pkg.tar.xz -exec cp '{}' ~/repo-dir/i686/ \;
repo-name
with whatever name you want
pushd ~/repo-dir/x86_64/
repo-add ./repo-name.db.tar.gz ./*.pkg.tar.xz
popd
pushd ~/repo-dir/i686/
repo-add ./repo-name.db.tar.gz ./*.pkg.tar.xz
popd
pushd ~/repo-dir/
tar -cvzf ../packages.tar.gz .
scp packages.tar.gz pratik@al.humbug.in:~
cd ~/al.humbug.in
tar -zxvf ../packages.tar.gz
pacman.conf
. Change repo-name
to whatever you used earlier.[repo-name] Server = http://al.humbug.in/$arch
sudo pacman -Syu
sudo pacman -S <package name>
Good ..good…