summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2020-12-31 10:01:28 +0200
committerVille Skyttä <ville.skytta@iki.fi>2020-12-31 21:35:25 +0200
commit2e83122b8e59d736c147768b5c191e69b7fb9ed9 (patch)
tree17a6dd6b0747a0b0c64b60f55bafaa762e208e9b
parent18e558fa1c8b90b86757ade09a4ba4d6a6cf8f70 (diff)
downloadshared-mime-info-work/scop/xdgmime-submodule.tar.gz
xdgmime: configure as submodulework/scop/xdgmime-submodule
So that we can bind it to a specific revision, and help with keeping clones up to date. GitLab CI instructs to use a relative path to submodules on the same GitLab server [0], but doing so causes a meson/ninja dist failure [1]. Configure using a full https URL for now, as it appears to work with GitLab just fine. [0] https://docs.gitlab.com/ce/ci/git_submodules.html [1] https://github.com/mesonbuild/meson/issues/8144
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--.gitmodules3
-rw-r--r--HACKING.md11
m---------xdgmime0
5 files changed, 12 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index e8a0e4b2..a060999f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
/_build/
/.python-version
-/xdgmime/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9f250537..9d2cc051 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,7 @@ variables:
findutils
gettext-devel
meson
+ GIT_SUBMODULE_STRATEGY: normal
build:meson:
before_script:
@@ -21,7 +22,6 @@ build:meson:
- dnf install -y --nogpgcheck $DEPENDENCIES
script:
# Compile xdgmime
- - git clone https://gitlab.freedesktop.org/xdg/xdgmime.git
- make -C xdgmime
# Compile and test shared-mime-info
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..c13ff7aa
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "xdgmime"]
+ path = xdgmime
+ url = https://gitlab.freedesktop.org/xdg/xdgmime.git
diff --git a/HACKING.md b/HACKING.md
index b60cc306..cdb348cd 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -35,9 +35,14 @@ more test files to be added to the test suite.
Test suite
----------
-You need to have xdgmime checked out [1] and compiled. By default, the build
-system will expect the source directory to be in the shared-mime-info
-directory. `./xdgmime/src/test-mime-data` will be run against
+You need to have xdgmime [1] checked out and compiled. In the shared-mime-info
+git repository, getting xdgmime is taken care of by using a git submodule; run
+`git submodule update --init` after cloning the shared-mime-info repo. If
+you wish to keep the submodule automatically up to date on pull, `git config
+submodule.recurse true` in the shared-mime-info dir helps with that.
+
+By default, the build system will expect the xdgmime directory to be in the
+shared-mime-info directory. `./xdgmime/src/test-mime-data` is run against
`tests/mime-detection/list`. An alternate path to xdgmime can be passed by
using the `xdgmime-path` meson option such as `-Dxdgmime-path=/path/to/xdgmime`.
diff --git a/xdgmime b/xdgmime
new file mode 160000
+Subproject de283fc430460b9b3a7e61432a6d273cd64cb10