The idea that I want to build a package locally on Arch Linux is because I'm lazy.
I didn't like the set of icon themes with Arch Linux, but I liked the set of icons with the Humman-dark package on fedora and wanted to get it on Arch Linux.
Although the Fedora package format is rpm, it's hard for me. In my opinion, a package containing only some icon files should be independent of the architecture platform, and the icon format should be compatible, and should be used normally on Arch Linux.
In fact, after the RPM unpacking is just a bunch of files, initially I used a makefile (can be used to install, uninstall) to complete the work, and later bored to do so.
It is said that Arch Linux can build its own software packages. So:
The simplest process is similar to the following steps, and more detailed tutorials can be found in the arch Linux WiKi.
Create a temporary build directory and create Pkgbuild (sample files can be found from/usr/share/pacman/)
It's a shell script that's guaranteed to work well on bash. You can run the MAKEPKG test at any time to create a pkgbuild that is working correctly. MAKEPKG requires that the following variables and a package function must be defined in the Pkgbuild script: pkgname=//define Packages name pkgvar=//define package version arch = (' value ')//define Package architecture, The value is optional i686,x86_64, and if there is no schema, it should be any. If a package is allowed to be built on more than one schema, but ultimately only on one schema, multiple values can be enclosed in single quotation marks and then separated by spaces .... source= (")//source is used to specify the software source package file name, which can be a path on the Internet or locally ( The source package of the Pkgname and Pkgvar variables can be referenced at this point, and it also allows multiple values to be specified as schemas. md5sum=//checksum can be automatically generated using MAKEPKG-G and appended to pkgbuild$ makepkg-g >> PKGBUILD pkgdir (for pkg) and srcdir (for SRC) These two variables do not need to be defined, They are created automatically before they are built, so they can be referenced directly in the function. The build function makes sense only when there is code that needs to be compiled, and this function is defined before the package function. Package This function is the only requirement for the MAKEPKG tool that must be defined in the Pkgbuild script.
The build environment is in a faceroot environment, and once the build is successful, MAKEPKG creates a package that can be installed Pacman directly under the build directory (format: $ (pkgname)-$ (Pkgvar)-.$ (arch). Tar.xz)
Build a package on Arch Linux