From trazyn, 1 Week ago, written in Plain Text.
This paste will croak in 2 Weeks.
Embed
  1. # Maintainer: Artoo <[email protected]>
  2. # Contributor: Christian Hesse <[email protected]>
  3. # Contributor: Dave Reisner <[email protected]>
  4. # Contributor: Tom Gundersen <[email protected]>
  5.  
  6. _pkgbase=systemd-stable
  7.  
  8. pkgbase=udev
  9. pkgname=('udev' 'libudev' 'esysusers' 'etmpfiles' 'eboot')
  10. pkgdesc='Userspace device file manager'
  11. _tag='472b4e59c3c095248b316ccceac5565fcaae9d3a' # git rev-parse v${_tag_name}
  12. _tag_name=252.1
  13. pkgver="${_tag_name/-/}"
  14. pkgrel=1
  15. arch=('x86_64')
  16. url='https://www.github.com/systemd/systemd'
  17. license=('GPL2' 'LGPL2.1')
  18. makedepends=('acl' 'kmod' 'util-linux' 'hwdata' 'libcap' 'kbd' 'gperf'
  19.             'intltool' 'git' 'meson' 'docbook-xsl' 'rsync' 'python-jinja')
  20. options=('debug' 'strip')
  21. validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4'  # Lennart Poettering <[email protected]>
  22.               'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E'  # Luca Boccassi <[email protected]>
  23.               '9A774DB5DB996C154EBBFBFDA0099A18E29326E1'  # Yu Watanabe <[email protected]>
  24.               '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew JÄ™drzejewski-Szmek <[email protected]>
  25. _alpm=57bcc7fee22d75df96fd546ee7215166cdfb1233
  26. source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}" #?signed
  27.         "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}" #?signed
  28.         '0001-Use-Arch-Linux-device-access-groups.patch'
  29.         initcpio-{hook,install}-udev
  30.         "git+https://gitea.artixlinux.org/artix/alpm-hooks.git#commit=${_alpm}"
  31.         meson-install-tags.patch
  32.         meson-artix.patch)
  33. sha512sums=('SKIP'
  34.             'SKIP'
  35.             'f26db75129f1f9a7b7235d77e4ec490864fa0a203431f515873443b227da3db7034d8d81f7974f23fc6fbeaa91727244ac8ab82762f02e87fb92ea19a6bd931f'
  36.             '32606b42856b5f3ea7f485143e532671f58986237e14c58ea5ab17383dc39a375cb6c738c8a2db9e4a8c8be88ea44a876d6bbed129cb2f5c9aa3f8228b04d927'
  37.             '38eed28d42ac8f70bc8d1058ace35f137f7f5c972442ee14b98c2146202e0615aa584304edbd59e8608d1b6bec3cb391fc69b25393740f6eabd8fc5ad3bde64f'
  38.             'SKIP'
  39.             'e936a4b245400140d2cb4ed250fe23639bc3aaf81fb958b9b10dc1ff5aeb094f37b657e044bf35e832fd4a69dccea5b19ef45d20852ce3aa49325ae2e59d8f51'
  40.             'a26003ddcac5a83ec1fec040b36ff46816869028dc79aebb2646f9f2ed090e6358601f911c9d6a04b426c7f3367595e12716e411fca34ffce59d718b067e4e5c')
  41.  
  42. _backports=(
  43. )
  44.  
  45. _reverts=(
  46. )
  47.  
  48. prepare() {
  49.     cd "$_pkgbase"
  50.  
  51.     # add upstream repository for cherry-picking
  52.     git remote add -f upstream ../systemd
  53.  
  54.     local _c
  55.     for _c in "${_backports[@]}"; do
  56.         git log --oneline -1 "${_c}"
  57.         git cherry-pick -n "${_c}"
  58.     done
  59.     for _c in "${_reverts[@]}"; do
  60.         git log --oneline -1 "${_c}"
  61.         git revert -n "${_c}"
  62.     done
  63.     patch -Np1 -i ../meson-install-tags.patch
  64.     patch -Np1 -i ../meson-artix.patch
  65.  
  66.     # Replace cdrom/dialout/tape groups with optical/uucp/storage
  67.     patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
  68. }
  69.  
  70. build() {
  71.     local _meson_options=()
  72.  
  73.     _meson_options+=(
  74.         -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-artix"
  75.         -Dshared-lib-tag="${pkgver}-${pkgrel}"
  76.         -Dmode=release
  77.  
  78.         -Dstandalone-binaries=true
  79.         -Dsysusers=true
  80.         -Dtmpfiles=true
  81.         -Dhwdb=true
  82.         -Dblkid=true
  83.         -Dgshadow=true
  84.  
  85.         -Dinstall-sysconfdir-standalone=true
  86.         -Ddefault-udevd-symlink='udevd'
  87.         -Ddefault-udevd-dir='/usr/bin'
  88.  
  89.         -Dsbat-distro='artix'
  90.         -Dsbat-distro-summary='Artix Linux'
  91.         -Dsbat-distro-pkgname="${pkgname}"
  92.         -Dsbat-distro-version="${pkgver}"
  93.  
  94.         -Dtests=true
  95.  
  96.         -Dlink-udev-shared=false
  97.         -Dlink-boot-shared=false
  98.         -Dman=false
  99.  
  100.         -Ddns-servers=''
  101.         -Dntp-servers=''
  102.         -Defi=false
  103.  
  104.         -Dsysvinit-path=
  105.  
  106.         -Ddefault-dnssec=no
  107.  
  108.         -Defi=true
  109.         -Dgnu-efi=true
  110.         -Dkernel-install=true
  111.  
  112.         -Dadm-group=false
  113.         -Danalyze=false
  114.         -Dapparmor=false
  115.         -Daudit=false
  116.         -Dbacklight=false
  117.         -Dbinfmt=false
  118.         -Dbzip2=false
  119.         -Dcoredump=false
  120.         -Ddbus=false
  121.         -Delfutils=false
  122.         -Denvironment-d=false
  123.         -Dfdisk=false
  124.         -Dgcrypt=false
  125.         -Dglib=false
  126.         -Dgnutls=false
  127.         -Dhibernate=false
  128.         -Dhostnamed=false
  129.         -Didn=false
  130.         -Dima=false
  131.         -Dinitrd=false
  132.         -Dfirstboot=false
  133.         -Dkernel-install=false
  134.         -Dldconfig=false
  135.         -Dlibcryptsetup=false
  136.         -Dlibcurl=false
  137.         -Dlibfido2=false
  138.         -Dlibidn=false
  139.         -Dlibidn2=false
  140.         -Dlibiptc=false
  141.         -Dlocaled=false
  142.         -Dlogind=false
  143.         -Dlz4=false
  144.         -Dmachined=false
  145.         -Dmicrohttpd=false
  146.         -Dnetworkd=false
  147.         -Dnscd=false
  148.         -Dnss-myhostname=false
  149.         -Dnss-resolve=false
  150.         -Dnss-systemd=false
  151.         -Doomd=false
  152.         -Dopenssl=false
  153.         -Dp11kit=false
  154.         -Dpam=false
  155.         -Dpcre2=false
  156.         -Dpolkit=false
  157.         -Dportabled=false
  158.         -Dpstore=false
  159.         -Dpwquality=false
  160.         -Drandomseed=false
  161.         -Dresolve=false
  162.         -Drfkill=false
  163.         -Dseccomp=false
  164.         -Dsmack=false
  165.         -Dsysext=false
  166.         -Dtimedated=false
  167.         -Dtimesyncd=false
  168.         -Dtpm=false
  169.         -Dqrencode=false
  170.         -Dquotacheck=false
  171.         -Duserdb=false
  172.         -Dutmp=false
  173.         -Dvconsole=false
  174.         -Dwheel-group=false
  175.         -Dxdg-autostart=false
  176.         -Dxkbcommon=false
  177.         -Dxz=false
  178.         -Dzlib=false
  179.         -Dzstd=false
  180.     )
  181.     artix-meson "$_pkgbase" build "${_meson_options[@]}"
  182.  
  183.     local _targets=()
  184.     _targets+=(
  185.         udev:shared_library
  186.         src/libudev/libudev.pc
  187.         udevadm
  188.         systemd-hwdb
  189.         src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,dmi_memory_id,scsi_id,v4l_id}
  190.         src/udev/udev.pc
  191.         rules.d/{50-udev-default,64-btrfs}.rules
  192.         hwdb.d/60-autosuspend-chromiumos.hwdb
  193.         man/{libudev.3,udev.conf.5,hwdb.7,udev.7,udevadm.8}
  194.  
  195.         systemd-{sysusers,tmpfiles}.standalone
  196.         sysusers.d/basic.conf
  197.         tmpfiles.d/{etc,static-nodes-permissions,var}.conf
  198.         man/{sysusers,tmpfiles}.d.5
  199.         man/systemd-{sysusers,tmpfiles}.8
  200.         factory/templates/locale.conf
  201.  
  202.         systemd-detect-virt
  203.         test/sys
  204.         test-udev
  205.         test-fido-id-desc
  206.         test-udev-builtin
  207.         test-udev-event
  208.         test-udev-node
  209.         test-udev-util
  210.         systemd-runtest.env
  211.         test-tmpfiles
  212.  
  213.         bootctl
  214.         kernel-install
  215.         man/bootctl.1
  216.         man/kernel-install.8
  217.         src/boot/efi/linuxx64.efi.stub
  218.         src/boot/efi/linuxx64.elf.stub
  219.         src/boot/efi/systemd-bootx64.efi
  220.     )
  221.     meson compile -C build "${_targets[@]}"
  222. }
  223.  
  224. check() {
  225.     local tests=()
  226.     tests+=(
  227.         test-sysusers.standalone
  228.         test-systemd-tmpfiles.standalone
  229.         test-tmpfiles
  230.         rule-syntax-check
  231.         test-fido-id-desc
  232.         test-udev-builtin
  233.         test-udev-event
  234.         test-udev-node
  235.         test-udev-util
  236. #         udev-test
  237.         test-libudev
  238.         test-libudev-sym
  239.         test-udev-device-thread
  240.     )
  241.     meson test -C build --print-errorlogs "${tests[@]}"
  242. }
  243.  
  244. _inst_doc(){
  245.     install -d "${pkgdir}"/usr/share/doc/"${pkgname}"
  246.     install -vm644 "$_pkgbase"/LICENSE.* "${pkgdir}"/usr/share/doc/"${pkgname}"
  247. }
  248.  
  249. _inst_man_udev() {
  250.     local x="$1" y=${1##*.}
  251.     install -d "${pkgdir}"/usr/share/man/man"$y"
  252.     install -vm644 build/man/"$x" "${pkgdir}"/usr/share/man/man"$y"
  253. }
  254.  
  255. _inst_man_utils() {
  256.     local u="$1"
  257.     install -d "${pkgdir}"/usr/share/man/man{5,8}
  258.     install -vm644 build/man/"$u".d.5 "${pkgdir}"/usr/share/man/man5
  259.     install -vm644 build/man/systemd-"$u".8 "${pkgdir}"/usr/share/man/man8/"$u".8
  260. }
  261.  
  262. package_udev() {
  263.     pkgdesc='Userspace device file manager'
  264.     depends=('acl' 'libacl.so' 'kmod' 'libkmod.so'
  265.             'util-linux' 'libblkid.so' 'libudev' 'hwdata' 'kbd')
  266.     provides=("udev=$pkgver")
  267.  
  268.     meson install -C build --destdir "$pkgdir" --no-rebuild --tags udev,udev-devel,libudev-devel
  269.  
  270.     mv -v  "${pkgdir}"/usr/bin/systemd-hwdb "${pkgdir}"/usr/bin/udev-hwdb
  271.  
  272.     for m in libudev.3 udev.conf.5 udev.7 udevadm.8; do
  273.         _inst_man_udev "$m"
  274.     done
  275.     _inst_doc
  276.  
  277.     # initcpio
  278.     install -vD -m0644 initcpio-install-udev "${pkgdir}"/usr/lib/initcpio/install/udev
  279.     install -vD -m0644 initcpio-hook-udev "${pkgdir}"/usr/lib/initcpio/hooks/udev
  280.  
  281.     # pacman hooks
  282.     make -C alpm-hooks DESTDIR="${pkgdir}" install_udev
  283. }
  284.  
  285. package_libudev() {
  286.     pkgdesc='udev library for enumerating and introspecting local devices'
  287.     depends=('gcc-libs')
  288.     provides=('libudev.so')
  289.  
  290.     meson install -C build --destdir "$pkgdir" --no-rebuild --tags libudev
  291. }
  292.  
  293. package_esysusers() {
  294.     pkgdesc='the sysusers.d binary'
  295.     groups=('base-devel')
  296.     depends=('gcc-libs' 'libxcrypt')
  297.  
  298.     meson install -C build --destdir "$pkgdir" --no-rebuild --tags sysusers
  299.  
  300.     mv -v  "${pkgdir}"/usr/bin/systemd-sysusers.standalone "${pkgdir}"/usr/bin/sysusers
  301.  
  302.     _inst_man_utils sysusers
  303.     _inst_doc
  304.  
  305.     # pacman hooks
  306.     make -C alpm-hooks DESTDIR="${pkgdir}" install_sysusers
  307. }
  308.  
  309. package_etmpfiles() {
  310.     pkgdesc='the tmpfiles.d binary'
  311.     groups=('base-devel')
  312.     depends=('acl' 'libacl.so' 'libcap' 'libcap.so')
  313.  
  314.     meson install -C build --destdir "$pkgdir" --no-rebuild --tags tmpfiles
  315.  
  316.     mv -v "${pkgdir}"/usr/bin/systemd-tmpfiles.standalone "${pkgdir}"/usr/bin/tmpfiles
  317.  
  318.     _inst_man_utils tmpfiles
  319.     _inst_doc
  320.  
  321.     # pacman hooks
  322.     make -C alpm-hooks DESTDIR="${pkgdir}" install_tmpfiles
  323. }
  324. package_eboot() {
  325.     pkgdesc='the boot binary'
  326.     depends=('gnu-efi')
  327.  
  328.     for target in bootctl kernel-install man/bootctl.1 man/kernel-install.8 \
  329.     src/boot/efi/linuxx64.{efi,elf}.stub src/boot/efi/systemd-bootx64.efi
  330.     do
  331.     meson install -C build --destdir "$pkgdir" --no-rebuild --tags $target
  332.     done
  333.  
  334.     _inst_man_utils bootctl
  335.     _inst_man_utils kernel-install
  336.     _inst_doc
  337.  
  338.     make -C alpm-hooks DESTDIR="${pkgdir}" install_boot
  339. }
captcha