diff --git a/.SRCINFO b/.SRCINFO index 5b7d9ac..4d2694d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,22 +1,19 @@ pkgbase = ocaml-ounit pkgdesc = Unit testing framework for OCaml pkgver = 2.2.7 - pkgrel = 1 + pkgrel = 4 url = https://github.com/gildor478/ounit arch = x86_64 - arch = i686 - arch = pentium4 - arch = armv7h arch = aarch64 license = MIT makedepends = dune>=3.0.0 makedepends = ocaml-findlib - depends = ocaml>=4.04.0 + depends = ocaml>=4.08.0 depends = ocaml-lwt>=2.5.2 - depends = ocaml-seq - depends = ocaml-stdlib-shims options = !strip - source = ocaml-ounit-2.2.7-1.tar.gz::https://github.com/gildor478/ounit/archive/v2.2.7.tar.gz - sha512sums = b2cefed53127f724c099391eefe1bce3b43cad5d6b629b5f1e9446b58892639de758f5dbcbd5efb6c409ce77ed01d06693989a3ba909cf79c36c2554c1473396 + source = ocaml-ounit-2.2.7.tar.gz::https://github.com/gildor478/ounit/archive/v2.2.7.tar.gz + source = remove-shim-deps.diff + b2sums = 6fb43eccf33a02d3fbbbec1fd00b2901ae69bb55e9c94790ebcfed68f676bc0a9a573f4e03edc8c542e195b68c77deae0426c884ea81ceef1149548f6b760673 + b2sums = 529b83b0c45bbe08637bbb12ce5884433a33439f32f212e0614a7e290abb84bd301a5752d89a695378a8c1d2276866f9bf60759a24842a483713f4ea6e8bf969 pkgname = ocaml-ounit diff --git a/.gitignore b/.gitignore index 82b3c18..076d904 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ -# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore -*.tar -*.tar.* -*.rpm -*.jar -*.exe -*.msi -*.zip -*.tgz -*.log -*.log.* -*.sig - -*/ +# Only exclude files from the root of the package repo, as some AUR helpers download sources into the directory of the repo, +# which causes the gitignore file to apply to them too, which breaks some builds +# Based on https://github.com/github/gitignore/blob/main/ArchLinuxPackages.gitignore +/*.tar +/*.tar.* +/*.rpm +/*.jar +/*.exe +/*.msi +/*.zip +/*.tgz +/*.log +/*.log.* +/*.sig diff --git a/PKGBUILD b/PKGBUILD index 5336612..b5dffd1 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,20 +10,30 @@ _projectname='ounit' pkgname="ocaml-$_projectname" pkgver='2.2.7' -pkgrel='1' +pkgrel='4' pkgdesc='Unit testing framework for OCaml' -# If you're running on i686, pentium4, armv7h or aarch64, you have to add it to the arch array of the cppo, ocaml-biniou, ocaml-easy-format and ocaml-yojson AUR dependencies -arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64') +arch=('x86_64' 'aarch64') url="https://github.com/gildor478/$_projectname" license=('MIT') -depends=('ocaml>=4.04.0' 'ocaml-lwt>=2.5.2' 'ocaml-seq' 'ocaml-stdlib-shims') +depends=('ocaml>=4.08.0' 'ocaml-lwt>=2.5.2') makedepends=('dune>=3.0.0' 'ocaml-findlib') options=('!strip') -source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz") -sha512sums=('b2cefed53127f724c099391eefe1bce3b43cad5d6b629b5f1e9446b58892639de758f5dbcbd5efb6c409ce77ed01d06693989a3ba909cf79c36c2554c1473396') +source=( + "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" + 'remove-shim-deps.diff' +) +b2sums=('6fb43eccf33a02d3fbbbec1fd00b2901ae69bb55e9c94790ebcfed68f676bc0a9a573f4e03edc8c542e195b68c77deae0426c884ea81ceef1149548f6b760673' + '529b83b0c45bbe08637bbb12ce5884433a33439f32f212e0614a7e290abb84bd301a5752d89a695378a8c1d2276866f9bf60759a24842a483713f4ea6e8bf969') _sourcedirectory="$_projectname-$pkgver" +prepare() { + cd "$srcdir/$_sourcedirectory/" + + # Remove seq and stdlib-shims dependencies, as we're always running on OCaml >= 4.08.0 + patch --forward -p1 < '../remove-shim-deps.diff' +} + build() { cd "$srcdir/$_sourcedirectory/" dune build --release --verbose @@ -38,6 +48,10 @@ cd "$srcdir/$_sourcedirectory/" DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose + for _folder in "$pkgdir/usr/share/doc/"*; do + mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder")" + done + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" - ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/MIT" } diff --git a/remove-shim-deps.diff b/remove-shim-deps.diff new file mode 100644 index 0000000..ea55563 --- /dev/null +++ b/remove-shim-deps.diff @@ -0,0 +1,48 @@ +diff --git a/ounit2-lwt.opam b/ounit2-lwt.opam +index 8b1cb1c..9961bc2 100644 +--- a/ounit2-lwt.opam ++++ b/ounit2-lwt.opam +@@ -13,7 +13,6 @@ depends: [ + "dune" {>= "3.0"} + "ocaml" {>= "4.04.0"} + "lwt" {>= "2.5.2"} +- "seq" + "ounit2" {= version} + "odoc" {with-doc} + ] +diff --git a/ounit2.opam b/ounit2.opam +index 87cf5c8..65b5a38 100644 +--- a/ounit2.opam ++++ b/ounit2.opam +@@ -16,8 +16,6 @@ depends: [ + "dune" {>= "3.0"} + "ocaml" {>= "4.04.0"} + "base-unix" +- "seq" +- "stdlib-shims" + "odoc" {with-doc} + ] + build: [ +diff --git a/src/lib/ounit2/advanced/dune b/src/lib/ounit2/advanced/dune +index 6792008..a687359 100644 +--- a/src/lib/ounit2/advanced/dune ++++ b/src/lib/ounit2/advanced/dune +@@ -11,4 +11,4 @@ + (name oUnitAdvanced) + (public_name ounit2.advanced) + (wrapped false) +- (libraries unix seq stdlib-shims)) ++ (libraries unix)) +diff --git a/src/lib/ounit2/dune b/src/lib/ounit2/dune +index c37911d..4a8f657 100644 +--- a/src/lib/ounit2/dune ++++ b/src/lib/ounit2/dune +@@ -2,7 +2,7 @@ + (name oUnit) + (public_name ounit2) + (wrapped false) +- (libraries unix seq ounit2.advanced)) ++ (libraries unix ounit2.advanced)) + + (documentation + (package ounit2)