devkitPro pacman: Difference between revisions

From devkitPro
Jump to navigation Jump to search
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Installing devkitPro Pacman==
devkitPro provided tools and libraries are managed by the rather wonderful [https://wiki.archlinux.org/index.php/pacman Arch Linux pacman]. We provide [https://github.com/devkitPro/pacman/releases/latest our own binaries] as .pkg for OSX and .deb for debian based linux distributions. On Fedora you can obtain pacman using the command '''sudo dnf install pacman''' and edit the pacman configuration files as you would for Arch based linux distros , and pre-existing msys2 installs. We also provide an [https://github.com/devkitPro/installer/releases/latest installer for windows] which sets up a customised msys2 install already set up with the devkitPro packages.
devkitPro provided tools and libraries are managed by the rather wonderful [https://wiki.archlinux.org/index.php/pacman Arch Linux pacman]. We provide [https://github.com/devkitPro/pacman/releases/latest our own binaries] as .pkg for OSX and .deb for debian based linux distributions. On Fedora you can obtain pacman using the command '''sudo dnf install pacman''' and edit the pacman configuration files as you would for Arch based linux distros , and pre-existing msys2 installs. We also provide an [https://github.com/devkitPro/installer/releases/latest installer for windows] which sets up a customised msys2 install already set up with the devkitPro packages.


The .deb package can also be used on WSL but you need to make a symlink for /etc/mtab. See https://github.com/Microsoft/WSL/issues/150
For Gentoo '''emerge sys-apps/pacman''' then edit /etc/pacman.conf and set RootDir = /. Run '''pacman-key --init''' then follow the instructions below.
     sudo ln -s /proc/sef/mounts /etc/mtab
 
The .deb package can also be used on WSL but you may need to make a symlink for /etc/mtab. See https://github.com/Microsoft/WSL/issues/150
     sudo ln -s /proc/self/mounts /etc/mtab
 
On Debian based systems install the .deb with (first sudo apt-get install gdebi-core if necessary)
    sudo gdebi devkitpro-pacman.deb
 
On macOS run the .pkg installer from Terminal with
    open devkitpro-pacman-installer.pkg
Then install the Xcode command line tools if you haven't already
    xcode-select --install
And finally reboot your mac to have ennviromnent variables set.


==Customising Existing Pacman Install==
==Customising Existing Pacman Install==


<span style="color: red;">'''Note:''' These instructions are for systems which come with pacman already installed i.e. Arch or Msys2. '''Do Not''' follow these instructions if you have dkp-pacman</span>
<span style="color: red;">'''Note:''' These instructions are for systems which come with pacman already installed i.e. Arch or Msys2. '''Do Not''' follow these instructions if you have dkp-pacman or used the devkitPro installer</span>


For users already using a distro which provides pacman please follow these instructions. This also applies to Fedora and Gentoo below as well as users who wish to use an existing msys2 install. If you're using a pre-existing msys2 install or OSX then please also set environment variables as follows :-  
For users already using a distro which provides pacman please follow these instructions. This also applies to Fedora and Gentoo below as well as users who wish to use an existing msys2 install. If you're using a pre-existing msys2 install rund the commands without sudo. Please also set environment variables as follows :-  


     DEVKITPRO=/opt/devkitpro
     DEVKITPRO=/opt/devkitpro
Line 14: Line 26:
     DEVKITPPC=/opt/devkitpro/devkitPPC
     DEVKITPPC=/opt/devkitpro/devkitPPC


First import the key which is used to validate the packages
First import the key which is used to validate the packages. There seem to be issues with keyservers so we specify one here but you may need to look for a working one.


    sudo pacman-key --recv F7FD5492264BB9D0
  sudo pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
    sudo pacman-key --lsign F7FD5492264BB9D0
  sudo pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0
 
Then Install the keyring which adds more keys used to verify the packages. Msys2 users should ignore the sudo part - i.e. type the command line without sudo.
 
    sudo pacman -U https://downloads.devkitpro.org/devkitpro-keyring.pkg.tar.xz


Add the devkitPro repositories. Please note that you will require two - one for the libraries and another for the host specific tools.
Add the devkitPro repositories. Please note that you will require two - one for the libraries and another for the host specific tools.
Line 23: Line 39:
edit /etc/pacman.conf & add these lines
edit /etc/pacman.conf & add these lines


    [dkp-libs]
[dkp-libs]
    Server = http://downloads.devkitpro.org/packages
Server = https://downloads.devkitpro.org/packages


for linux systems also add  
for linux systems also add  
      
      
    [dkp-linux]
[dkp-linux]
    Server = http://downloads.devkitpro.org/packages/linux
Server = https://downloads.devkitpro.org/packages/linux/$arch/


for existing msys2 systems use this one instead of dkp-linux above.
for existing 64 bit msys2 systems (you installed msys2-x86_64 package) use this one instead of dkp-linux above.


    [dkp-windows]
[dkp-windows]
    Server = http://downloads.devkitpro.org/packages/windows
Server = https://downloads.devkitpro.org/packages/windows


install the keyring which adds more keys which may be used to verify the packages.
for existing 32 bit msys2 systems (you installed msys2-i686 package) use this one instead:


    sudo pacman -U https://downloads.devkitpro.org/devkitpro-keyring-r1.787e015-2-any.pkg.tar.xz
[dkp-win32]
Server = https://downloads.devkitpro.org/packages/win32


Now resync the database and update installed packages.
Now resync the database and update installed packages.
Line 46: Line 63:
==Using Pacman==
==Using Pacman==


The customised pacman we ship for OSX and debian based distros is entirely self-contained within /opt/devkitpro/pacman. To avoid polluting the system and avoid clashes with system tools or games which may share the same name as pacman binaries we install helper scripts in /usr/local/bin which temporarily set path and forward to the custom binaries. This means you substitute dkp-pacman for pacman on those systems.
The customised pacman we ship for OSX and debian based distros is entirely self-contained within /opt/devkitpro/pacman. To avoid polluting the system and avoid clashes with system tools or games which may share the same name as pacman binaries we install helper scripts in /usr/local/bin which temporarily set path and forward to the custom binaries. <span style="color: red;">'''This means you substitute dkp-pacman for pacman on those systems. Do not add /opt/devkitpro/pacman/bin to your system path, this will cause issues.'''<span>
    
    
===Updating Databases===
===Updating Databases===


To resync the databases before obtaining updates, this command is similar to '''apt-get update'''
To resync the databases before obtaining updates, this command is similar to '''apt-get update'''
     sudo pacman -Sy
     sudo (dkp-)pacman -Sy
To update installed packages, this command is similar to '''apt-get upgrade'''
To update installed packages, this command is similar to '''apt-get upgrade'''
     sudo pacman -Syu
     sudo (dkp-)pacman -Syu


===Installing packages===
===Installing packages===
Line 59: Line 76:
You can list all available packages with
You can list all available packages with


     pacman -Sl
     (dkp)-pacman -Sl


To show only the libraries supplied by devkitPro append dkp-libs
To show only the libraries supplied by devkitPro append dkp-libs


     pacman -Sl dkp-libs
     (dkp-)pacman -Sl dkp-libs
 
You can search for packages using
 
    (dkp-)pacman -Ss <search string>


===Predefined Groups===
===Predefined Groups===
We provide several convenient groups which may be installed using '''sudo pacman -S <group name>'''
We provide several convenient groups which may be installed using '''sudo (dkp-)pacman -S <group name>'''


  - gp32-dev
  - gp32-dev
Line 72: Line 93:
  - nds-dev
  - nds-dev
  - 3ds-dev
  - 3ds-dev
- gamecube-dev
  - wii-dev
  - wii-dev
  - gamecube-dev
  - wiiu-dev
  - switch-dev
  - switch-dev



Revision as of 22:52, 7 August 2020

Installing devkitPro Pacman

devkitPro provided tools and libraries are managed by the rather wonderful Arch Linux pacman. We provide our own binaries as .pkg for OSX and .deb for debian based linux distributions. On Fedora you can obtain pacman using the command sudo dnf install pacman and edit the pacman configuration files as you would for Arch based linux distros , and pre-existing msys2 installs. We also provide an installer for windows which sets up a customised msys2 install already set up with the devkitPro packages.

For Gentoo emerge sys-apps/pacman then edit /etc/pacman.conf and set RootDir = /. Run pacman-key --init then follow the instructions below.

The .deb package can also be used on WSL but you may need to make a symlink for /etc/mtab. See https://github.com/Microsoft/WSL/issues/150

   sudo ln -s /proc/self/mounts /etc/mtab

On Debian based systems install the .deb with (first sudo apt-get install gdebi-core if necessary)

   sudo gdebi devkitpro-pacman.deb

On macOS run the .pkg installer from Terminal with

   open devkitpro-pacman-installer.pkg

Then install the Xcode command line tools if you haven't already

   xcode-select --install

And finally reboot your mac to have ennviromnent variables set.

Customising Existing Pacman Install

Note: These instructions are for systems which come with pacman already installed i.e. Arch or Msys2. Do Not follow these instructions if you have dkp-pacman or used the devkitPro installer

For users already using a distro which provides pacman please follow these instructions. This also applies to Fedora and Gentoo below as well as users who wish to use an existing msys2 install. If you're using a pre-existing msys2 install rund the commands without sudo. Please also set environment variables as follows :-

   DEVKITPRO=/opt/devkitpro
   DEVKITARM=/opt/devkitpro/devkitARM
   DEVKITPPC=/opt/devkitpro/devkitPPC

First import the key which is used to validate the packages. There seem to be issues with keyservers so we specify one here but you may need to look for a working one.

  sudo pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
  sudo pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0

Then Install the keyring which adds more keys used to verify the packages. Msys2 users should ignore the sudo part - i.e. type the command line without sudo.

   sudo pacman -U https://downloads.devkitpro.org/devkitpro-keyring.pkg.tar.xz

Add the devkitPro repositories. Please note that you will require two - one for the libraries and another for the host specific tools.

edit /etc/pacman.conf & add these lines

[dkp-libs]
Server = https://downloads.devkitpro.org/packages

for linux systems also add

[dkp-linux]
Server = https://downloads.devkitpro.org/packages/linux/$arch/

for existing 64 bit msys2 systems (you installed msys2-x86_64 package) use this one instead of dkp-linux above.

[dkp-windows]
Server = https://downloads.devkitpro.org/packages/windows

for existing 32 bit msys2 systems (you installed msys2-i686 package) use this one instead:

[dkp-win32]
Server = https://downloads.devkitpro.org/packages/win32

Now resync the database and update installed packages.

    sudo pacman -Syu

Using Pacman

The customised pacman we ship for OSX and debian based distros is entirely self-contained within /opt/devkitpro/pacman. To avoid polluting the system and avoid clashes with system tools or games which may share the same name as pacman binaries we install helper scripts in /usr/local/bin which temporarily set path and forward to the custom binaries. This means you substitute dkp-pacman for pacman on those systems. Do not add /opt/devkitpro/pacman/bin to your system path, this will cause issues.

Updating Databases

To resync the databases before obtaining updates, this command is similar to apt-get update

   sudo (dkp-)pacman -Sy

To update installed packages, this command is similar to apt-get upgrade

   sudo (dkp-)pacman -Syu

Installing packages

You can list all available packages with

   (dkp)-pacman -Sl

To show only the libraries supplied by devkitPro append dkp-libs

   (dkp-)pacman -Sl dkp-libs

You can search for packages using

   (dkp-)pacman -Ss <search string>

Predefined Groups

We provide several convenient groups which may be installed using sudo (dkp-)pacman -S <group name>

- gp32-dev
- gba-dev 
- nds-dev
- 3ds-dev
- gamecube-dev
- wii-dev
- wiiu-dev
- switch-dev

To list packages use `dkp-pacman -Sl` To install a package use `sudo dkp-pacman -S <name of package>` `sudo dkp-pacman -R <name of package>` will remove an already installed package.