Browse Source

Ports: Add dosfstools port

Liav A 2 years ago
parent
commit
6bb738c1b3
3 changed files with 21 additions and 0 deletions
  1. 1 0
      Ports/AvailablePorts.md
  2. 17 0
      Ports/dosfstools/package.sh
  3. 3 0
      Userland/Libraries/LibC/paths.h

+ 1 - 0
Ports/AvailablePorts.md

@@ -42,6 +42,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
 | [`doom`](doom/)                                     | DOOM                                                            |                          | https://github.com/SerenityOS/SerenityDOOM                                     |
 | [`doom`](doom/)                                     | DOOM                                                            |                          | https://github.com/SerenityOS/SerenityDOOM                                     |
 | [`dos2unix`](dos2unix/)                             | dos2unix                                                        | 7.4.3                    | https://waterlan.home.xs4all.nl/dos2unix.html                                  |
 | [`dos2unix`](dos2unix/)                             | dos2unix                                                        | 7.4.3                    | https://waterlan.home.xs4all.nl/dos2unix.html                                  |
 | [`dosbox-staging`](dosbox-staging/)                 | DOSBox Staging                                                  | 0.76.0                   | https://dosbox-staging.github.io/                                              |
 | [`dosbox-staging`](dosbox-staging/)                 | DOSBox Staging                                                  | 0.76.0                   | https://dosbox-staging.github.io/                                              |
+| [`dosfstools`](dosfstools/)                         | dosfstools utility suite                                        | 4.2                      | https://github.com/dosfstools/dosfstools/                                      |
 | [`drascula`](drascula/)                             | Dráscula: The Vampire Strikes Back                              | 1.0                      | https://www.scummvm.org/games/#games-drascula                                  |
 | [`drascula`](drascula/)                             | Dráscula: The Vampire Strikes Back                              | 1.0                      | https://www.scummvm.org/games/#games-drascula                                  |
 | [`dreamweb`](dreamweb/)                             | DreamWeb                                                        | 1.1                      | https://www.scummvm.org/games/#games-dreamweb                                  |
 | [`dreamweb`](dreamweb/)                             | DreamWeb                                                        | 1.1                      | https://www.scummvm.org/games/#games-dreamweb                                  |
 | [`dropbear`](dropbear/)                             | Dropbear SSH                                                    | 2022.82                  | https://dropbear.nl/mirror/dropbear.html                                       |
 | [`dropbear`](dropbear/)                             | Dropbear SSH                                                    | 2022.82                  | https://dropbear.nl/mirror/dropbear.html                                       |

+ 17 - 0
Ports/dosfstools/package.sh

@@ -0,0 +1,17 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port='dosfstools'
+version='4.2'
+useconfigure='true'
+use_fresh_config_sub='true'
+config_sub_paths=('config.sub')
+files="https://github.com/dosfstools/dosfstools/releases/download/v${version}/dosfstools-${version}.tar.gz dosfstools-${version}.tar.gz 64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527"
+auth_type='sha256'
+
+pre_configure() {
+    run ./autogen.sh 
+}
+
+post_install() {
+    ln -sf /usr/local/sbin/mkfs.fat "${SERENITY_INSTALL_ROOT}/usr/local/sbin/mkfs.vfat"
+    ln -sf /usr/local/sbin/mkfs.fat "${SERENITY_INSTALL_ROOT}/usr/local/sbin/mkfs.msdos"
+}

+ 3 - 0
Userland/Libraries/LibC/paths.h

@@ -8,3 +8,6 @@
 
 
 // FIXME: This is just a default value to satisfy OpenSSH, feel free to change it.
 // FIXME: This is just a default value to satisfy OpenSSH, feel free to change it.
 #define _PATH_MAILDIR "/var/mail"
 #define _PATH_MAILDIR "/var/mail"
+
+// Deprecated definition for dosfstools port.
+#define _PATH_MOUNTED "/etc/mtab"