ยง2023-07-23

  1. modclean
# Maintainer: Nicola Squartini <tensor5@gmail.com>

pkgname=modclean
pkgver=3.0.0beta.1
pkgrel=3
pkgdesc='Remove unwanted files and directories from your node_modules folder'
arch=('any')
url='https://github.com/ModClean/modclean'
license=('MIT')
depends=('nodejs')
makedepends=('npm')
options=(!emptydirs)

package() {
    npm install -g --prefix="${pkgdir}/usr" ${pkgname}@3.0.0-beta.1

    cd "${pkgdir}/usr/lib/node_modules/${pkgname}"
    install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
    ln -s \
        $(realpath --relative-to="${pkgdir}/usr/share/licenses/${pkgname}" LICENSE) \
        "${pkgdir}/usr/share/licenses/${pkgname}"
    sed -e "s|${srcdir}|/|" -i package.json
    find node_modules -name 'package.json' -exec sed -e "s|${pkgdir}||" -i {} \;
    ./bin/modclean.js -r -a '.bin,bin.js' --ignore='license'

    # npm gives ownership of ALL FILES to build user
    # https://bugs.archlinux.org/task/63396
    chown -R root:root "${pkgdir}"
}
  1. makepkg -si

$ wget wget https://aur.archlinux.org/cgit/aur.git/snapshot/libmongocrypt.tar.gz && cd ..
$ tar xvf src/libmongocrypt.tar.gz  && cd libmongocrypt/
# edit PKGBUILD, --> arch=('x86_64' 'aarch64')
$ makepkg -si
  1. mongosh
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/mongosh.tar.gz && cd ..
$ tar xvf src/mongosh.tar.gz && cd ../mongosh
# nano PKGBUILD , add aarch64 to arch
$ makepkg -si

  1. join into replSetName: "odroid01" mongodb.conf
# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /opt/mongoDB/log/mongod.log

# Where and how to store data.
storage:
  dbPath: /opt/mongoDB/data
  #journal:
    #enabled: true

#  engine:  wiredTiger
#  mmapv1:
#  wiredTiger:

# how the process runs
# processManagement:
#  fork: true  # fork and run in background
#  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile

# network interfaces
net:
  port: 27017
  # bindIp: ysubutun.chingyen.com.tw
  bindIpAll: true   # default is Flase, and mutual exclusive with bindIP.
  # ssl param is inside net:
  # ssl:

# security
security:
  # authorization: enabled
  keyFile: /home/mongoDbKey/odroid01-keyfile
  # clusterAuthMode: x509

#operationProfiling:


#replicationSet
replication:
  replSetName: "odroid01"

#sharding:

## Enterprise-Only Options

#auditLog:

#snmp: