From cbd19301ee92ed4db0c5abae4bb1886ab18d4198 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 14 Sep 2020 20:09:17 +0300 Subject: update --- docs/docs/Repository-Conventions.html | 207 ++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 docs/docs/Repository-Conventions.html (limited to 'docs/docs/Repository-Conventions.html') diff --git a/docs/docs/Repository-Conventions.html b/docs/docs/Repository-Conventions.html new file mode 100644 index 0000000..bb276dc --- /dev/null +++ b/docs/docs/Repository-Conventions.html @@ -0,0 +1,207 @@ + + + + + + +Repository Conventions (Carbs Linux User Manual) + + + + + + + + + + + + + + + + +
+

+Previous: , Up: Conventions  

+
+
+

3.1.3 Repository Conventions – 20

+ +

Repository conventions are important in order to ensure every package resemble +themselves. Here are the things to keep in mind: +

+
+
[2010]
+

Prefer tarballs over git packages unless there is a sensible reason. +Here are some: +

+
    +
  • Every patch is a new release. (See vim) +
  • There are no releases. (See https://git.suckless.org/sbase) +
  • Following a development branch. +
  • There has been a long time since the latest release, but upstream is far ahead. +
+ +
+
[2020]
+

Prefer sources without a dependency to automake. There are usually +distribution tarballs that are autoconf’ed. Don’t submit tarballs +with an automake dependency unless you are sure there is no +alternative. +

+
[2030]
+

Avoid these packages: +

+
dbus
+

Usually can be disabled by --disable-dbus +

+
gettext
+

Usually can be disabled by --disable-nls +

+
+
+
[2040]
+
    +
  • Always install a package to the /usr prefix. +
  • All binaries should go to /usr/bin, not /usr/sbin or any other +directory. +
  • All libraries should go to /usr/lib. +
+
+
[2050]
+

All build files on the repository should be a POSIX shell script, and must start +with #!/bin/sh -e. +

+
+ +

The next section is about package templates that should be used in order to +ensure stylistic consistency. Note that the option configurations shouldn’t be +taken literally, they are meant as examples. +

+

[2210] Make +

+
+
#!/bin/sh -e
+
+make
+make DESTDIR="$1" PREFIX=/usr install
+
+ +

[2211] Configure/Make +

+
+
#!/bin/sh -e
+
+./configure \
+    --prefix=/usr \
+    --disable-option \
+    --enable-option
+
+make
+make DESTDIR="$1" install
+
+ + +

[2212] Autoconf/Automake +

+

See 2020 +

+
+
#!/bin/sh -e
+
+autoreconf -fi
+
+./configure \
+    --prefix=/usr \
+    --disable-option \
+    --enable-option
+
+make
+make DESTDIR="$1" install
+
+ +

[2220] Meson +

+
+
#!/bin/sh -e
+
+export DESTDIR=$1
+
+meson \
+    --prefix=/usr \
+    -Doption=false \
+    -Doption2=true \
+    . output
+
+ninja -C output
+ninja -C output install
+
+ +

[2230] Cmake +

+
+
#!/bin/sh -e
+
+export DESTDIR=$1
+
+cmake -B build \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DOPTION=ON
+
+cmake --build   build
+cmake --install build
+
+ +

[2240] Go +

+
+
#!/bin/sh -e
+
+export GOPATH=$PWD/gopath
+trap "go clean -modcache" EXIT INT
+go mod vendor
+
+go build
+install -Dm755 program "$1/usr/bin/program"
+
+ +

[2241] Python +

+
+
#!/bin/sh -e
+
+python setup.py build
+python setup.py install --prefix=/usr --root="$1"
+
+ +
+
+

+Previous: , Up: Conventions  

+
+ + + + + -- cgit v1.2.3