Skip to content

Commit cef1abc

Browse files
committed
Generate the macports index files by sshing over to an OSX box
1 parent bcec81d commit cef1abc

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

packaging/macports/Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ VERSION=$(shell echo $(TARBALL) | sed -e 's:rabbitmq-server-\(.*\)\.tar\.gz:\1:g
66
# The URL at which things really get deployed
77
REAL_WEB_URL=http://www.rabbitmq.com/
88

9-
DEST=macports/net/rabbitmq-server
9+
# The user@host for an OSX machine with macports installed, which is
10+
# used to generate the macports index files. That step will be
11+
# skipped if this variable is not set. If you do set it, you might
12+
# also want to set SSH_OPTS, which allows adding ssh options, e.g. to
13+
# specify a key that will get into the OSX machine without a
14+
# passphrase.
15+
MACPORTS_USERHOST=
16+
17+
MACPORTS_DIR=macports
18+
DEST=$(MACPORTS_DIR)/net/rabbitmq-server
1019

1120
dirs:
1221
mkdir -p $(DEST)/files
@@ -27,5 +36,19 @@ macports: dirs $(DEST)/Portfile
2736
$(DEST)/files/rabbitmq-script-wrapper
2837
cp patch-org.macports.rabbitmq-server.plist.diff $(DEST)/files
2938

39+
macports_index:
40+
if [ -n "$(MACPORTS_USERHOST)" ] ; then \
41+
tar cf - -C $(MACPORTS_DIR) . | ssh $(SSH_OPTS) lshift@macrabbit ' \
42+
d="/tmp/mkportindex.$$$$" ; \
43+
mkdir $$d \
44+
&& cd $$d \
45+
&& tar xf - \
46+
&& /opt/local/bin/portindex >/dev/null \
47+
&& tar cf - PortIndex* \
48+
&& cd \
49+
&& rm -rf $$d' \
50+
| tar xf - -C $(MACPORTS_DIR) ; \
51+
fi
52+
3053
clean:
3154
rm -rf $(DEST) checksums.sed

0 commit comments

Comments
 (0)