Ubuntu22/Local Repository
From r00tedvw.com wiki
(Difference between revisions)
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
[[Ubuntu22/Local_Repository|Local Repository]] | [[Ubuntu22/Local_Repository|Local Repository]] | ||
− | <nowiki>sudo apt-get install -y gcc dpkg-dev gpg</nowiki> | + | =Prerequisites= |
+ | <nowiki>~$ sudo apt-get install -y gcc dpkg-dev gpg</nowiki> | ||
+ | =Example app= | ||
+ | <nowiki>~$ mkdir -p ~/example/hello-world-program | ||
+ | ~$ echo '#include <stdio.h> | ||
+ | int main() { | ||
+ | printf("hello packaged world\n"); | ||
+ | return 0; | ||
+ | }' > ~/example/hello-world-program/hello.c | ||
+ | ~$ cd ~/example/hello-world-program | ||
+ | ~$ gcc -o hello-world hello.c</nowiki> | ||
+ | =Naming convention= | ||
+ | <package-name>_<version>-<release-number>_<architecture> | ||
+ | <nowiki>~$ mkdir -p ~/example/hello-world_0.0.1-1_amd64/usr/bin | ||
+ | ~$ cp ~/example/hello-world-program/hello-world ~/example/hello-world_0.0.1-1_amd64/usr/bin/.</nowiki> |
Latest revision as of 10:33, 5 December 2022
Local Repository
[edit] Prerequisites
~$ sudo apt-get install -y gcc dpkg-dev gpg
[edit] Example app
~$ mkdir -p ~/example/hello-world-program ~$ echo '#include <stdio.h> int main() { printf("hello packaged world\n"); return 0; }' > ~/example/hello-world-program/hello.c ~$ cd ~/example/hello-world-program ~$ gcc -o hello-world hello.c
[edit] Naming convention
<package-name>_<version>-<release-number>_<architecture>
~$ mkdir -p ~/example/hello-world_0.0.1-1_amd64/usr/bin ~$ cp ~/example/hello-world-program/hello-world ~/example/hello-world_0.0.1-1_amd64/usr/bin/.