Skip to content

Commit

Permalink
Generate org.dnscrypt.osx.DNSCryptProxy.plist from a template
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Jan 20, 2017
1 parent 6ce1f14 commit d6aa39c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ m4/ltargz.m4
man/*.html
man/Makefile.in
missing
org.dnscrypt.osx.DNSCryptProxy.plist
probes.h
probes_dnscrypt_proxy.h
src/*.o
Expand Down
11 changes: 10 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EXTRA_DIST = \
dnscrypt-proxy.service.in \
dnscrypt-proxy.socket \
dnscrypt-update-resolvers.sh.in \
org.dnscrypt.osx.DNSCryptProxy.plist \
org.dnscrypt.osx.DNSCryptProxy.plist.in \
resolvers-check.sh

SUBDIRS = \
Expand Down Expand Up @@ -51,12 +51,21 @@ doc_DATA += \
dnscrypt-proxy.socket
endif

noinst_DATA = \
org.dnscrypt.osx.DNSCryptProxy.plist

dnscrypt-proxy.service: dnscrypt-proxy.service.in
$(SED) \
-e 's|[@]sbindir@|$(sbindir)|g' \
-e 's|[@]sysconfdir@|$(sysconfdir)|g' \
< dnscrypt-proxy.service.in > dnscrypt-proxy.service

org.dnscrypt.osx.DNSCryptProxy.plist: org.dnscrypt.osx.DNSCryptProxy.plist.in
$(SED) \
-e 's|[@]sbindir@|$(sbindir)|g' \
-e 's|[@]sysconfdir@|$(sysconfdir)|g' \
< org.dnscrypt.osx.DNSCryptProxy.plist.in > org.dnscrypt.osx.DNSCryptProxy.plist

CLEANFILES = \
dnscrypt-proxy.service

Expand Down
7 changes: 3 additions & 4 deletions dist-build/ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export LDFLAGS="$LDFLAGS -L${SODIUM_IOS_PREFIX}/lib"
make clean && \
make -j3 install && \
rm -fr "${PREFIX}/include" "${PREFIX}/share" "${PREFIX}/man" && \
sed 's#/usr/local/#/usr/#g' < org.dnscrypt.osx.DNSCryptProxy.plist > \
"$PREFIX/org.dnscrypt.osx.DNSCryptProxy.plist" && \
cp README-iOS.markdown "$PREFIX/" && \
echo "dnscrypt-proxy has been installed into $PREFIX" && \
install -m 644 org.dnscrypt.osx.DNSCryptProxy.plist "${PREFIX}/org.dnscrypt.osx.DNSCryptProxy.plist" && \
cp README-iOS.markdown "${PREFIX}/" && \
echo "dnscrypt-proxy has been installed into ${PREFIX}" && \
echo 'Now, using codesign(1) to sign dnscrypt-proxy'
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<key>ProgramArguments</key>
<array>
<!-- You might want to change this on iOS or if you installed the proxy in a specific location -->
<string>/usr/local/sbin/dnscrypt-proxy</string>
<string>@sbindir@/dnscrypt-proxy</string>

<!-- You may want to change this on iOS or if you installed the proxy in a specific location -->
<!-- Also check the paths in that configuration file, especially the path to dnscrypt-resolvers.csv -->
<!-- You might also have to disable plugins (such as the LocalCache option) -->
<string>/usr/local/etc/dnscrypt-proxy.conf</string>
<string>@sysconfdir@/dnscrypt-proxy.conf</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
Expand Down

0 comments on commit d6aa39c

Please sign in to comment.