1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
<div align="center">

*(package it!)*
</div>
# What is this?
pkgit is an unconventional package manager designed to compile & install packages directly from their git repository.
> ***[DISCLAIMER]***
>
> Due to the nature of pkgit, you are solely responsible for vetting the repos that you add to your system.
>
> Use at your own risk.
# Compile pkgit
Enter the project directory, and follow one of the following procedures.
## Using Make
```
make
```
## Using bldit
```
./bldit
```
Both methods will create an executable in the root directory of the project.
# Install pkgit
After compiling, run the following with root privilages:
```
make install
```
# Usage
## Installing Packages
### Basic install
Assuming you have already added its respective repo, you can install a package by specifying its name:
```
pkgit install [pkg_name]
```
Or you can use the short command:
```
pkgit i [pkg_name]
```
If you want to specify a version other than the latest, you can use `--tag:` or `-t:`:
```
pkgit install [pkg_name] --tag:[tag]
```
### Repo install
If you haven't added the package's repository yet, or you just want to be specific, you can install the package using its git URL:
```
pkgit install [url.git]
```
Installing specific versions works the same as with the package name:
```
pkgit install [url.git] --tag:[tag]
```
### List install
If you have multiple packages you want to install at once, you have a couple options.
1. The one-liner:
```
pkgit install [pkg1Name] [pkg2Name] --tag:[tag] [url1.git] [url2.git] --tag:[tag]
```
2. The package list:
- Create a file with all the packages you want to install. The following is that file's syntax:
```
[pkg_name]
[pkg_name] [tag]
[url.git]
[url.git] [tag]
```
- Run the install command with `--list:` or `-l:`:
```
pkgit install --list:[filename]
```
## Removal
### Packages
Removing (uninstalling) a package is as simple as it seems:
```
pkgit remove [pkg_name]
```
Or the short command:
```
pkgit r [pkg_name]
```
### Repositories
Removing a repository is also relatively simple. Run the following command:
```
pkgit remove --repo:[pkg_name]
```
It will then prompt you with every URL in your repo that matches this package's name. Select the index of the one you want to remove.
## Dependency Management
As it is, pkgit is capable of dependency management, but you will likely have to determine the dependency URLs for each package you install (`/etc/pkgit/deps/[pkg-name].pkgdeps`). There's not a universal way to check for dependencies without using an existing package manager (unless the repo you're installing has a pkgdeps file).
### [USER]: Creating a .pkgdeps file
Thankfully, this is a very simple process.
For each dependency, all you need to do in the .pkgdeps file is paste the dependency's remote git URL in its own line.
Here's an example for `/etc/pkgit/deps/mush.pkgdeps`:
```
https://github.com/mpv-player/mpv
https://github.com/yt-dlp/yt-dlp
https://github.com/FFmpeg/FFmpeg
https://github.com/curl/curl
https://github.com/quodlibet/mutagen
```
That's it! pkgit will read from this file and resolve these dependencies automatically.
### [DEVELOPER]: Pkgdeps in your package
If you want your own package's dependencies to be resolved in pkgit, you can create a `pkgdeps` file in the root directory of your project's git repo.
Do not name it anything other than `pkgdeps`, or pkgit will not find the file.
The syntax displayed above applies to this file.
> [!WARNING]
> Recursive dependency management does NOT work in pkgit, so you may want to list your dependencies accordingly.
## Custom Compile Instructions - bldit
The bldit file is a very basic shell script, and is meant exclusively to COMPILE the program.
NOT to install the program.
Creating a custom bldit file is useful for those comfortable with going through compile steps manually.
The file is stored in `/etc/pkgit/bldit/` and is named after the package exactly (all lowercase).
It is also a very simple process to create a bldit file. A great example of a bldit file
is right here in the pkgit repository:
```
make
```
Basically, this contains the steps to compile the program.
### [USER]: Creating a bldit file
If you wanted to create your own custom bldit file for pkgit,
you would make a file: `/etc/pkgit/bldit/pkgit` and create your own bldit script in there.
### [DEVELOPER]: Bldit in your package
If your package doesn't build correctly using pkgit, you can create a `bldit` file in the root directory of your project's repo.
Do not name it anything other than `bldit`, or pkgit will not find the file.
The syntax displayed above applies to this file.
## Custom Repositories
A custom repository is as simple to create as a `pkgdeps` file.
All you need is URLs separated by new lines. Each URL must correspond to a remote git repository of a package.
The file name doesn't matter in this case, because you will add this repository by running:
`pkgit a [filename]`
You can also add repositories from a URL by running:
`pkgit a [URL]`
> [!NOTE]
> This only works if the URL leads to the RAW file.
From here, pkgit will add all the URLs into its own local repository in `/usr/pkgit/repos/repos`.
Because of this simplistic format, you can easily create and share repositories on your own, or using existing larger repos like the AUR and GURU repos.
|