Coder Social home page Coder Social logo

kde-git's Introduction

About

This repository contains scripts to build and install KDE packages from source on Arch Linux, by automatically fetching and modifying the official PKGBUILDs.

The package names are the same as those in the official repos, and their versions are <arch-version>_<tag>.r<revision>.g<commit>_<yyyymmdd>. This ensures that the built packages are always newer than the official packages, and they automatically follow the versioning of the official packages.

WARNING: Always make backups before updating your system!

Preparation

Install dependencies

sudo pacman -S devtools parallel

Setting up chroot

Building the packages in a chroot is strongly recommended. The packages should be installed at the same time, when all of them have been built successfully.

source src/prefix.sh
mkarchroot -C <pacman.conf> -M <makepkg.conf> $CHROOT/root base-devel devtools parallel
arch-nspawn $CHROOT/root useradd $USER
sudo bash -c "echo '$USER ALL=(ALL) NOPASSWD: ALL' >> $CHROOT/root/etc/sudoers"
arch-nspawn $CHROOT/root bash -c "mkdir -p /home/$USER/build; chown -R $USER:$USER /home/$USER"
sudo cp -r src $CHROOT/root/home/$USER
arch-nspawn $CHROOT/root bash

Before you build, make sure the chroot is up to date:

arch-nspawn $CHROOT/root pacman -Syu

Setting up local repository

If you set up PKGDEST in makepkg.conf (in the chroot), you can also turn the directory into a local repository by running

repo-add $PKGDEST/<repo-name>.db.tar.gz $PKGDEST/*.pkg.tar.zst

Then, you can add the repository to /etc/pacman.conf by adding the following lines before all the other repositories:

[<repo-name>]
SigLevel = Optional TrustAll
Server = file://<path-to-pkgdest>

TIP: The old packages can be cleaned by running

paccache -c $PKGDEST -k 1 -r

Usage

Common usage

mkdir build; cd build
source ../src/prefix.sh

See all local packages that are available:

get_local_packages.sh | tee local_packages.txt

Find the correct order of building the packages:

get_build_order.sh $(cat local_packages.txt) | tee local_build_order.txt

Build all local packages:

build_install_all.sh $(cat local_build_order.txt)

It is recommended to use the environment variables documented below to perform the build process step by step.

TIP: You can use the environment variable CMAKE_BUILD_PARALLEL_LEVEL to control the number of parallel builds.

build_install_all.sh

This script will build and install all packages passed as arguments in the order they are passed. The following environment variables can be set to skip certain steps:

  • SKIP_FETCH: skip fetching the PKGBUILD
  • SKIP_PATCH: skip patching the PKGBUILD
  • SKIP_PREPARE: skip preparing the package sources
  • SKIP_BUILD: skip building and installing the package

Troubleshooting

If a package fails to build, you can manually edit the PKGBUILD to try to fix the issue. To share your solution, you can add a <package-name>.patch file to the src/patches directory. The patch will be applied after all the standard patches have been applied. Pull requests are welcome!

kde-git's People

Contributors

fanzhuyifan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.