• Stars
    star
    957
  • Rank 47,767 (Top 1.0 %)
  • Language
    Shell
  • License
    Other
  • Created about 14 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An ArchLinux's pacman-like shell wrapper for many package managers. 56KB and run anywhere.

pacapt - An ArchLinux's pacman-like wrapper for many package managers

Build Status

pacapt is a 56KB shell wrapper for many package managers. Simply install package with pacapt -S htop or pacapt install htop on any Linux, BSD, OpenWrt or Mac OS machines. It supports the following package managers:

  • pacman from Arch Linux-based systems, ArchBang, Manjaro, etc.
  • apt-cyg from Cygwin (via apt-cyg)
  • apt-get from Debian, Ubuntu, etc.
  • homebrew from Mac OS X
  • macports from Mac OS X
  • yum/rpm from Redhat, CentOS, Fedora, Oracle Linux, etc.
  • portage from Gentoo
  • zypper from OpenSUSE
  • pkgng from FreeBSD
  • cave from Exherbo Linux
  • pkg_tools from OpenBSD
  • sun_tools from Solaris(SunOS)
  • apk from Alpine Linux
  • opkg from OpenWrt
  • tazpkg from SliTaz Linux
  • swupd from Clear Linux
  • xbps from Void Linux
  • tlmgr from TeX Live
  • conda from Conda

TOC

Installation

This script shouldn't be installed on an Arch-based system. On cave-based system, bash is required.

Install the stable script from Github

You can download the stable script and make it executable. On non-Arch-based system, you may use pacman as script name instead of pacapt.

$ sudo wget -O /usr/local/bin/pacapt https://github.com/icy/pacapt/raw/ng/pacapt
$ sudo chmod 755 /usr/local/bin/pacapt
$ sudo ln -sv /usr/local/bin/pacapt /usr/local/bin/pacman || true

If you have curl and want some interesting output:

# WARNING: Don't do this on Arch-based system!
$ curl -Lo /usr/bin/pacman https://github.com/icy/pacapt/raw/ng/pacapt
$ chmod 755 /usr/bin/pacman

For non-system package manager, you need to create symbolic links

$ ln -s /usr/local/bin/pacapt /usr/local/bin/pacapt-tlmgr
$ ln -s /usr/local/bin/pacapt /usr/local/bin/pacapt-conda

You can also use shorter links:

$ ln -s /usr/local/bin/pacapt /usr/local/bin/p-tlmgr
$ ln -s /usr/local/bin/pacapt /usr/local/bin/p-conda

noting the suffix (e.g., -tlmgr, -conda) is mandatory.

Usage

Basic operations

For system package manager

  • Update package database: pacapt -Sy, or pacapt update
  • Install a package: pacapt -S foo, or pacapt install foo
  • Search a package: pacapt -Ss foo, or pacapt search foo
  • Remove a package: pacapt -R foo, or pacapt remove foo
  • Upgrade system: pacapt -Su, or pacapt upgrade
  • Remove orphans: pacapt -Sc, or pacapt autoremove foo
  • Clean up: pacapt -Scc or pacapt -Sccc, or pacapt clean

For non-system package manager: Similar as above, however you need to call correct script name, e.g.,

  • Install a Conda package: pacapt-conda -S foo
  • Remove a Conda package: pacapt-conda -R foo

Basic options

See also https://github.com/icy/pacapt/blob/ng/lib/help.txt.

Some basic command line options

  • -h (--help): Print help message;
  • -P: Print list of supported operations;
  • -V: Print script version

Some popular options of the original ArchLinux's pacman program are supported and listed in the table in the next section.

A long list of options and operations can be found from ArchLinux's wiki.

Implemented operations

           Q Qc Qe Qi Qk Ql Qm Qo Qp Qs Qu R Rn Rns Rs S Sc Scc Sccc Sg Si Sii Sl Ss Su Suy Sy U
      apk  ~     *  *     *     *     *  * *  *   *  * *  *   *    *     *   *  *  *  *   *  * *
  apt_cyg  *        *     *                *           *                           *         *
     cave  *        *     *     *  *  *  * *  *   *  * *  *   *    x     *         *  *   *  * x
    conda  *                    *          *           *  *              *         *      *
      dnf  ~  *  *  *     *  *  *  *  *  * *           *  *   *    *  *  *   *  *  *  *   *  * *
     dpkg  ~  *  *  *  *  *     *  *  *  * *  *   *  ~ *  *   *    *  *  *   *     *  *   *  * *
 homebrew  *  *     *     *           *  * *           *  *   *    *     *         *  *   *  *
 macports     *           *     *        * *         ~ *  *   *          *         *  *   *  *
     opkg  *        *     *     *     *  * *           *                 *   *     *  *      * *
    pkgng  *        *     *     *  *     * *         * *  *   *          *         *  *   *  *
pkg_tools  ~        *     *     *  *     * *  *   *  ~ *  *   x          *      *  ~  *   *  x
  portage  *  *     *     *     *        * *         * *  *   *    *     *         *  *   *  *
sun_tools  *        *     *     *     *    *                                                   *
    swupd  *        *  *        *     *    *           *  *   *                    *  *   *  *
   tazpkg  *        *     *     *          *           *  *   *                    *  *   *  * *
    tlmgr           *  *  *                *           *                 *      *  *      *    *
     xbps  *     *  *     *     *     *    *           *      *                    *  *   *  *
      yum  *  *  *  *     *  *  *  *  *  * *         * *  *   *    *  *  *   *     *  *   *  * *
   zypper  *  *     *     *  *  *  *  *  * *  *   *  * *  *   *    *  *  *   *  *  *  *   *  * *

Notes:

  • *: Implemented;
  • ~: Implemented. Some options may not supported/implemented;
  • x: Operation is not supported by Operating system;
  • The table is generated from source. Please don't update it manually.

Related projects

  • batch-pacapt: An Arch's pacman-like package manager for Windows
  • node-pacapt: A node.js wrapper of pacapt + batch-pacapt
  • pacapt's nd branch: A rewrite in Dlang, now deprecated.
  • pacapt-py: A proof of concept in Python to provide pacapt-like experience to Homebrew.
  • pacapt-go: A more complete rewrite in Go, now lives in the go-dev branch of pacaptr as legacy code.

Similar projects

  • sysget is a front-end for every package manager, written in C++. It provides some basic features to manipulate packages on your system.
  • pacaptr was originally started as a Rust port of this project (pacapt) (See also #126), now it's growing with their own new features and support.

Development

General steps

Make sure you read some instructions in CONTRIBUTING.md.

A development script can be compiled from the source code.

$ git clone https://github.com/icy/pacapt.git
$ cd pacapt

# switch to development branch
$ git checkout ng

# compile the script
$ ./bin/compile.sh > pacapt.dev

# check if syntax is good
$ bash -n pacapt.dev

$ sudo install -m755 ./pacapt.dev /usr/local/bin/pacapt

Please read the sample Makefile for some details.

License

This work is released under the terms of Fair license (http://opensource.org/licenses/fair).

AUTHORS. CONTRIBUTORS

Many people have contributed to the project by sending pull requests and/or reporting on the ticket system. Here is an incomplete list of authors and contributors.

  • 10sr (@10sr)
  • Alexander Dupuy (@dupuy)
  • Anh K. Huynh (@icy)
  • Antony Lee (@anntzer)
  • Alex Lyon (@Arcterus)
  • Álvaro Mondéjar (@mondeja)
  • Carl X. Su (@bcbcarl)
  • Cuong Manh Le (@Gnouc)
  • Daniel YC Lin (@dlintw)
  • Danny George (@dangets)
  • Darshit Shah (@darnir)
  • Dmitry Kudriavtsev (@dkudriavtsev)
  • Eric Crosson (@EricCrosson)
  • Evan Relf (@evanrelf)
  • GijsTimmers (@GijsTimmers)
  • Hà-Dương Nguyễn (@cmpitg)
  • Huy Ngô (@NgoHuy)
  • James Pearson (@xiongchiamiov)
  • Janne Heß (@dasJ)
  • Jiawei Zhou (@4679)
  • Karol Blazewicz
  • Kevin Brubeck (@unhammer)
  • Konrad Borowski (@xfix)
  • Kylie McClain (@somasis)
  • Gen Li (@Rami3L)
  • Valerio Pizzi (@Pival81)
  • Siôn Le Roux (@sinisterstuf)
  • Tabulate (@TabulateJarl8)
  • Thiago Perrotta (@thiagowfx)
  • Vojtech Letal (@letalvoj)

More Repositories

1

bash-coding-style

A Bash coding style
284
star
2

google-group-crawler

[Deprecated] Get (almost) original messages from google group archives. Your data is yours.
Shell
215
star
3

w2w

What/Why people move from this to that.
150
star
4

bocker

Write Dockerfile completely in Bash/Bourne. Extensible and simple.
Shell
141
star
5

gk8s

Scripting-friendly tool to work with multiple k8s clusters.
Shell
41
star
6

btsync

Btsync (bittorrent sync) API for Bash users :)
Shell
18
star
7

bashy

A collection of my Bash utils and functions and stuff
Shell
12
star
8

genvsub

Another way to substitute environment variables in shell format strings ${FOO}, designed for k8s stuff
Shell
12
star
9

dusybox

I'm learning Dlang
D
12
star
10

k8s-vbox-the-hard-way

Script to bootstrap k8s cluster the hard way with Virtualbox
Shell
11
star
11

fortune-vn

Fun quotes for Vietnamese developers
Shell
9
star
12

cloudflare_api

Cloudflare API v4 binding in Bash4
Shell
7
star
13

git_xy

Handy way to manage (sub)module in multiple repositories. Designed for lazy engineers. This project is written for educational purpose only. Use them at your own risk.
Shell
6
star
14

rolo

Prevents a program from running more than one copy at a time
Ruby
5
star
15

ido

"I do" stops interactive command if there is any potential risky pattern
Go
5
star
16

docker

Dockerfiles written in Bocker extensible format
Shell
5
star
17

golo

Prevent an application from running twice. This is a Golang version of rolo/solo
Go
4
star
18

s3zip

Compress AWS S3 policies and make them maintainable for human being. Compress 1200 lines of Json files into 120 lines of configuration.
Ruby
4
star
19

jaloc

Just another laptop on the cloud
2
star
20

jenkins-groovy-library

Jenkins Library of Groovy Scripts
Ruby
2
star
21

offloadme

Save money with data offloading
Ruby
2
star
22

handcd

General purpose CD system.
1
star
23

geany.filedefs

A dark theme for Geany
Tcl
1
star
24

ram_free5G

Free 5G memory for your server or laptop!
1
star
25

JupyterHub-provisoners

Getting started with JupyterHub
Shell
1
star
26

icy_picture_modify

A Piwigo plugin that allows users to modify pictures they uploaded
PHP
1
star
27

latency

1
star
28

gDockerImageCheck

Check if Docker Image exists (well, before you deploy...)
Go
1
star
29

k8s-select

The official repository of k8s-select.rb https://gist.github.com/icy/228d7ce15b6c1fc66994a490608e6c7c
Ruby
1
star