aboutsummaryrefslogtreecommitdiff
path: root/extra/shared-mime-info
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
committerCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
commit03423e0583057cbe5a16f8439183e2dbc0e8dd7c (patch)
tree81fe3ba69d94146f83fb5541d1fb2da0ac4eac08 /extra/shared-mime-info
downloadrepository-03423e0583057cbe5a16f8439183e2dbc0e8dd7c.tar.gz
secondary commit
Diffstat (limited to 'extra/shared-mime-info')
-rwxr-xr-xextra/shared-mime-info/build54
-rw-r--r--extra/shared-mime-info/checksums1
-rw-r--r--extra/shared-mime-info/depends4
-rwxr-xr-xextra/shared-mime-info/post-install3
-rw-r--r--extra/shared-mime-info/sources1
-rw-r--r--extra/shared-mime-info/version1
6 files changed, 64 insertions, 0 deletions
diff --git a/extra/shared-mime-info/build b/extra/shared-mime-info/build
new file mode 100755
index 00000000..58dddbe2
--- /dev/null
+++ b/extra/shared-mime-info/build
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+#
+# We bypass the build system entirely as it has
+# a mandatory dependency on gettext.
+
+# Grab the package version.
+read -r version _ < "${0%/*}/version"
+
+mkdir -p "$1/usr/share/mime/packages" \
+ "$1/usr/share/pkgconfig" \
+ "$1/usr/bin"
+
+# Install with only English support.
+sed -e 's/_comment/comment/g' freedesktop.org.xml.in \
+ > "$1/usr/share/mime/packages/freedesktop.org.xml"
+
+# Replace markers in the file.
+sed -e 's|@prefix@|/usr|' -e "s|@VERSION@|$version|" shared-mime-info.pc.in \
+ > "$1/usr/share/pkgconfig/shared-mime-info.pc"
+
+# Define our own config.h statically.
+cat << EOF > config.h
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+#define HAVE_FDATASYNC 1
+#define HAVE_GETTEXT 0
+#define HAVE_INTTYPES_H 1
+#define HAVE_LC_MESSAGES 1
+#define HAVE_LOCALE_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_UNISTD_H 1
+#define PACKAGE "shared-mime-info"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME "shared-mime-info"
+#define PACKAGE_STRING "shared-mime-info $version"
+#define PACKAGE_TARNAME "shared-mime-info"
+#define PACKAGE_URL ""
+#define PACKAGE_VERSION "$version"
+#define STDC_HEADERS 1
+#define VERSION "$version"
+EOF
+
+# Fix config.h include.
+sed -i 's/<config.h>/"config.h"/' update-mime-database.c
+
+# shellcheck disable=2046
+"${CC:-gcc}" -o "$1/usr/bin/update-mime-database" \
+ $(pkg-config --libs --cflags glib-2.0 libxml-2.0) \
+ update-mime-database.c
diff --git a/extra/shared-mime-info/checksums b/extra/shared-mime-info/checksums
new file mode 100644
index 00000000..4c76dfe4
--- /dev/null
+++ b/extra/shared-mime-info/checksums
@@ -0,0 +1 @@
+2df77d547fa0548def38614f318282bc9937e7bde5f139d35053b605f7fd34df Release-1-15.tar.gz
diff --git a/extra/shared-mime-info/depends b/extra/shared-mime-info/depends
new file mode 100644
index 00000000..4919fada
--- /dev/null
+++ b/extra/shared-mime-info/depends
@@ -0,0 +1,4 @@
+glib
+libxml2
+xz
+zlib
diff --git a/extra/shared-mime-info/post-install b/extra/shared-mime-info/post-install
new file mode 100755
index 00000000..e9dffaad
--- /dev/null
+++ b/extra/shared-mime-info/post-install
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+update-mime-database -V /usr/share/mime
diff --git a/extra/shared-mime-info/sources b/extra/shared-mime-info/sources
new file mode 100644
index 00000000..4ad8576c
--- /dev/null
+++ b/extra/shared-mime-info/sources
@@ -0,0 +1 @@
+https://github.com/freedesktop/xdg-shared-mime-info/archive/Release-1-15.tar.gz
diff --git a/extra/shared-mime-info/version b/extra/shared-mime-info/version
new file mode 100644
index 00000000..b5a3e89c
--- /dev/null
+++ b/extra/shared-mime-info/version
@@ -0,0 +1 @@
+1.15 1