This repo is mainly dedicated to Carch for building and installing the Carch package on Arch, Fedora, openSUSE and Termux.
For Arch, we provide a PKGBUILD that directly grabs the precompiled binary from the latest release.
You can install Carch using this PKGBUILD:
git clone https://github.com/carch-org/pkgs ~/pkgs
cd ~/pkgs/carch-bin
makepkg -siFor Fedora and openSUSE, this repo includes a working spec file to build an RPM package. openSUSE supports RPMs, so the same process works for both.
Below is a simple guide to build it yourself.
Install all the core tools:
sudo dnf install rpm-build rpmdevtools redhat-rpm-config make gcc \
fedora-packager gnupg2 rpm-sign createrepo_c git patch tarAlso install the core build tools for Carch:
sudo dnf install cargo gitrpmdev-setuptreeThis will create the build directories in
~/rpmbuild.
Download the carch.spec file into ~/rpmbuild/SPECS/
wget https://github.com/carch-org/pkgs/raw/refs/heads/main/carch.spec ~/rpmbuild/SPECS/Change to the SPECS directory:
cd ~/rpmbuild/SPECSNote: Make sure you are in
~/rpmbuild/SPECS/before running this.
spectool -g -R carch.specrpmbuild -ba carch.specWait for the build to finish, then go to:
cd ~/rpmbuild/RPMS/x86_64/You will see the .rpm file if the build was successful.
To avoid installation warnings (especially on openSUSE), it’s recommended to sign your RPMs.
Click to expand
gpg --full-generate-keyUse a 4096 key size. Enter your real name and email; the comment is optional.
List your generated keys:
gpg --list-keysOr with long IDs:
gpg --list-keys --keyid-format LONGEdit (or create) ~/.rpmmacros:
echo '%_gpg_name Your Name <yourmailid@gmail.com>' >> ~/.rpmmacrosNote: Use your own key like this, don’t copy paste my key that will not work either.
Export your public key:
gpg --export --armor 36F67F5CD54828D7574F6FF39DE08866EE317104 > publickey.ascImport it into the RPM keyring:
sudo rpm --import publickey.ascReplace the filename with your actual RPM:
rpmsign --addsign ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpmYou’ll be asked for the passphrase you set when creating your GPG key.
rpm --checksig ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpmA successful result looks like:
carch-5.3.1-1.fc42.x86_64.rpm: digests signatures OKsudo dnf install carch-5.3.1-1.fc42.x86_64.rpmOr on openSUSE:
sudo zypper install carch-5.3.1-1.fc42.x86_64.rpmopenSUSE may warn that the package is unsigned if it was signed on Fedora. To avoid this, sign the RPM on openSUSE too. If you sign on openSUSE, the same RPM works fine on Fedora too. If you only care about Fedora, signing on Fedora is enough.
Also, if you don’t want to sign, you can use --allow-unsigned-rpm for openSUSE:
sudo zypper install -y --allow-unsigned-rpm *.rpmFor Fedora, even if it is not signed, there is no warning, so no issue at all in Fedora-based distros.
Basically we are using the script build-termux-deb.sh to build a .deb file that is compatible with Termux environment. You can just run that script to build on your local machine. Make sure you have dpkg installed on your distro before running the script. Dpkg is needed to build a .deb file especially for Debian or Termux env, as Termux uses deb packages like Debian.
Clone the repo and run the script.
git clone https://github.com/carch-org/pgks && cd pkgs
./build-termux-deb.shThis deb file doesn't compile the Carch to build deb, instead it uses already compiled arm & aarch64 binary from Carch release and builds a .deb file that can be installed via dpkg -i *.deb or directly pkg install *.deb
You can find those .deb files in Carch release
If anything from my side I am doing or telling is wrong, or anything else, you can open an issue for that.