Difference between revisions of "Buildiso with AUR packages: Using buildpkg"

fixed prompts
imported>Fhdk
(fixed prompts)
Line 12: Line 12:
The first thing you should probably do is create a directory for your online repository. The online repository is called '''online-repo''' throughout this tutorial and it is located in your home-folder. You however are free to choose name location to your liking. This'll help keep things organized. Your repository consist of only this folder:
The first thing you should probably do is create a directory for your online repository. The online repository is called '''online-repo''' throughout this tutorial and it is located in your home-folder. You however are free to choose name location to your liking. This'll help keep things organized. Your repository consist of only this folder:


  ~ >>> mkdir ~/online-repo/x86_64
  ~ $ mkdir ~/online-repo/x86_64


This online repository is created in your home folder, but you can create it anywhere you want.
This online repository is created in your home folder, but you can create it anywhere you want.
Line 20: Line 20:
Create a folder for the packages you want to build. The name is arbitrary decriptor - you can call it anything you think suitable.
Create a folder for the packages you want to build. The name is arbitrary decriptor - you can call it anything you think suitable.


  ~ >>> mkdir ~/pkgbuild
  ~ $ mkdir ~/pkgbuild


Clone the relevant package(s) from AUR or from Github. Later you might create them yourself! You can select any package to build but as example we build the package <code>kickshaw</code>. Kickshaw is modern menu editor for among others openbox. First you add it to your pkgubild repo. Do this using git
Clone the relevant package(s) from AUR or from Github. Later you might create them yourself! You can select any package to build but as example we build the package <code>kickshaw</code>. Kickshaw is modern menu editor for among others openbox. First you add it to your pkgubild repo. Do this using git


  ~ >>> cd ~/pkgbuild
  ~ $ cd ~/pkgbuild
  ~/pkgbuild >>> git clone https://aur.archlinux.org/kickshaw
  ~/pkgbuild $
~/pkgbuild $ git clone https://aur.archlinux.org/kickshaw


Now you have a folder with a <code>PKGBUILD</code> file in your repo
Now you have a folder with a <code>PKGBUILD</code> file in your repo


  ~/pkgbuild >>> ls -R  
  ~/pkgbuild $ ls -R  
  ~/pkgbuild >>> cat kickshaw/PKGBUILD
  ~/pkgbuild $ cat kickshaw/PKGBUILD


==Building with buildpkg==
==Building with buildpkg==
Line 36: Line 37:
The '''buildpkg''' has some options you need to familiarize yourself with.
The '''buildpkg''' has some options you need to familiarize yourself with.


  ~ >>> buildpkg -h                                                                                                      
  ~/pkgbuild $ buildpkg -h
 
  Usage: buildpkg [options]
  Usage: buildpkg [options]
     -p <pkg>          Build list or pkg [default: default]
     -p <pkg>          Build list or pkg [default: default]
Line 54: Line 56:
Next thing to do is build the package. Please note that you must be located one level above your actual PKGBUILD. Understand this as the <code>-p</code> argument is '''the name of the folder''' holding the PKGBUILD instructionset.  
Next thing to do is build the package. Please note that you must be located one level above your actual PKGBUILD. Understand this as the <code>-p</code> argument is '''the name of the folder''' holding the PKGBUILD instructionset.  


  ~ >>> buildpkg -p kickchaw
  ~/pkgbuild $ buildpkg -p kickchaw


For more examples how to use '''buildpkg''', look [https://wiki.manjaro.org/index.php?title=Manjaro-tools#buildpkg here].
For more examples how to use '''buildpkg''', look [https://wiki.manjaro.org/index.php?title=Manjaro-tools#buildpkg here].


The buildpkg script creates a closed environment for building the package. This is done, so not to pollute your system with build artifacts.  
The buildpkg script creates a closed environment for building the package. This is done, so not to pollute your system with build artifacts.


==Copy package files to online repository==
==Copy package files to online repository==
Line 74: Line 76:
Copy or move your package files to your online repository:
Copy or move your package files to your online repository:


  ~ >>> cp -r /var/cache/manjaro-tools/pkg/stable ~/online-repo
  ~/pkgbuild $ cp -r /var/cache/manjaro-tools/pkg/stable ~/online-repo


==Build a .db file==
==Build a .db file==
Line 82: Line 84:
Use the command <code>repo-add</code> to build a database file
Use the command <code>repo-add</code> to build a database file


  ~ >>> cd ~/online-repo/x86_64
  ~/pkgbuild $ cd ~/online-repo/x86_64
  ~/online-repo/x86_64 >>> repo-add online-repo.db.tar.gz *.pkg.tar.*
  ~/online-repo/x86_64 $ repo-add online-repo.db.tar.gz *.pkg.tar.*
  ~/online-repo/x86_64 >>> ls
  ~/online-repo/x86_64 $ ls
  kickshaw-0.5-2-x86_64.pkg.tar.xz  online-repo.db  online-repo.db.tar.gz  online-repo.files  online-repo.files.tar.gz
  kickshaw-0.5-2-x86_64.pkg.tar.xz  online-repo.db  online-repo.db.tar.gz  online-repo.files  online-repo.files.tar.gz


Line 101: Line 103:
==Add online-repo to your iso-profile==
==Add online-repo to your iso-profile==


Create a file  
Create a file


  ${profile_dir}/user-repos.conf
  ${profile_dir}/user-repos.conf


Add these lines  
Add these lines


  [online-repo]
  [online-repo]
Line 132: Line 134:
  manjaro-settings-manager
  manjaro-settings-manager
  menulibre
  menulibre
  ...
  ...
  ## AUR packages
  ## AUR packages
  '''kickshaw'''
  '''kickshaw'''
Line 142: Line 142:
For removing your build environment from your hard drive, execute:
For removing your build environment from your hard drive, execute:


  sudo rm -r /var/lib/manjaro-tools/buildpkg
  ~ $ sudo rm -r /var/lib/manjaro-tools/buildpkg




=More=
==More==


Now, you can continue to [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso#manjaro-tools.conf adjust your manjaro-tools.conf] or [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso#Build_your_ISO build your ISO].
Now, you can continue to [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso#manjaro-tools.conf adjust your manjaro-tools.conf] or [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso#Build_your_ISO build your ISO].
Moderators, translator
424

edits