summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Hornsey2020-11-23 13:44:24 -0600
committerFred Hornsey2020-11-23 13:44:24 -0600
commitbd4eba8e03143414ee94cf5c7aeddcfe06523b55 (patch)
tree35d64eef1739c5831277fef6d08c2fcf79488f14
parent95683eeac2f8bdcd1dfee32ff129d1f489ca8b87 (diff)
downloadaur-opendds-git.tar.gz
Various Improvements
Various improvements from opendds. Also use pkgver function. The problem with this is that it requires a full git clone, which I tried to avoid before with the git sources that don't support --depth=1. Also a shallow copy doesn't have the tags that the pkgver function needs. Thankfully I only have to use a full git clone on OpenDDS and not ACE_TAO, which takes a lot longer than ACE_TAO to fully clone.
-rw-r--r--PKGBUILD51
-rw-r--r--strip.pl26
2 files changed, 63 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d88986ee0c40..b929ac1aec12 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,40 +2,57 @@
# Contributor: Brian Bidulock <bidulock@openss7.org>
pkgname=opendds-git
-pkgver=3.13
-pkgrel=2
+pkgver=3.14
+pkgrel=1
pkgdesc="Open source C++ implementation of OMG Data Distribution Service (DDS)"
arch=('i686' 'x86_64')
-url="http://www.opendds.org/"
+url="https://www.opendds.org/"
license=('custom')
depends=('perl' 'bash')
+provides=('opendds' 'ace' 'tao')
+conflicts=('opendds' 'ace' 'tao')
options=('!buildflags')
makedepends=('git')
source=(
- "MPC.tar.gz::https://github.com/DOCGroup/MPC/tarball/master"
- "ACE_TAO.tar.gz::https://github.com/DOCGroup/ACE_TAO/tarball/master"
- "OpenDDS.tar.gz::https://github.com/objectcomputing/OpenDDS/tarball/master"
- build.patch
- )
-md5sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'c44b0c8d7ebccc2b9be0a040ec9f8c2b')
+ "MPC.tar.gz::https://github.com/DOCGroup/MPC/tarball/master"
+ "ACE_TAO.tar.gz::https://github.com/DOCGroup/ACE_TAO/tarball/master"
+ "OpenDDS::git+https://github.com/objectcomputing/OpenDDS"
+ build.patch
+)
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'c44b0c8d7ebccc2b9be0a040ec9f8c2b'
+)
+
+_strip_pl="$(realpath strip.pl)"
prepare() {
cd "$srcdir"
mv DOCGroup-ACE_TAO-* ACE_TAO
mv DOCGroup-MPC-* MPC
- mv objectcomputing-OpenDDS-* OpenDDS
patch --strip=1 -i ../build.patch
}
+pkgver() {
+ cd "$srcdir/OpenDDS"
+ git describe --long | \
+ sed 's/\([^-]*-g\)/r\1/;s/^DDS-//g;s/-/./g' | \
+ sed 's/^\([0-9]\+\)\.\([0-9]\+\)\.r/\1.\2.0\.r/g'
+}
+
build() {
cd "$srcdir/OpenDDS"
./configure \
--mpc="$srcdir/MPC" \
--ace="$srcdir/ACE_TAO/ACE" \
- --tao="$srcdir/ACE_TAO/TAO"
+ --tao="$srcdir/ACE_TAO/TAO" \
+ --configh '#define ACE_LACKS_READDIR_R' \
+ --configh '#define ACE_DISABLE_MKTEMP' \
+ --configh '#define ACE_DISABLE_TEMPNAM' \
+ --no-tests \
+ --no-debug
make
}
@@ -43,10 +60,16 @@ package() {
cd "$srcdir/OpenDDS"
source setenv.sh
make INSTALL_PREFIX="/usr" DESTDIR="$pkgdir" install
+
+ # Copy Licences
cd "$srcdir"
install -Dm644 "$DDS_ROOT/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/OpenDDS_LICENSE"
install -Dm644 "$ACE_ROOT/COPYING" "$pkgdir/usr/share/licenses/$pkgname/ACE_TAO_LICENSE"
# TODO Other licences
+
+ # Strip $srcdir from Generated Files
+ cd "$pkgdir"
+ perl "$_strip_pl" "$srcdir"
}
# vim:set ts=2 sw=2 et:
diff --git a/strip.pl b/strip.pl
new file mode 100644
index 000000000000..548a157f8991
--- /dev/null
+++ b/strip.pl
@@ -0,0 +1,26 @@
+# Strip paths from generated IDL headers that could be installed
+use strict;
+use warnings;
+
+use File::Find qw/find/;
+use Cwd qw/abs_path/;
+
+my $srcdir = abs_path($ARGV[0]);
+my $srcdir_re = quotemeta($srcdir);
+
+sub path_func {
+ my $path = $_;
+ return if (!-T $path);
+ open(my $file, "+<$path") or die("Could not open $path: $!");
+ my $lines = "";
+ while (my $line = <$file>) {
+ $line =~ s/$srcdir_re\/?//g;
+ $lines .= $line;
+ }
+ seek($file, 0, 0);
+ print $file $lines;
+ truncate($file, tell($file));
+ close($file);
+}
+
+find({wanted => \&path_func, follow => 0, no_chdir => 1}, abs_path("."));