2 # Copyright (C) 2008-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ingles.homeunix.net/software/ost/latest/
16 PKG_MD5SUM:=420d1fda246097d7e4d1277f39069578
18 include $(INCLUDE_DIR)/package.mk
20 define Package/ostiary
22 CATEGORY:=Administration
23 TITLE:=Simple, Secure Remote Script Execution
24 URL:=http://ingles.homeunix.net/software/ost/index.html
27 define Package/ostiary/description
28 Designed to allow you to run a fixed set of commands remotely,
29 without giving everyone else access to the same commands.
31 Provides - ostiaryd daemon (~25kb)
35 EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
39 --sysconfdir="/etc/ostiaryd" \
40 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 DESTDIR="$(PKG_INSTALL_DIR)" \
50 define Package/ostiary/install
51 $(INSTALL_DIR) $(1)/etc/ostiaryd
52 $(INSTALL_CONF) $(PKG_BUILD_DIR)/tests/ostiary.cfg $(1)/etc/ostiaryd/ostiary.cfg
53 $(INSTALL_DIR) $(1)/etc/ostiaryd/scripts
54 $(INSTALL_BIN) ./files/{ssh_enable,ssh_disable} $(1)/etc/ostiaryd/scripts
55 $(INSTALL_DIR) $(1)/etc/init.d/
56 $(INSTALL_BIN) ./files/ostiaryd.init $(1)/etc/init.d/ostiaryd
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/{ostiaryd,ostclient} $(1)/usr/bin/
64 define Package/ostiary/postinst
66 # check if we are on real system
67 if [ -z "$${IPKG_INSTROOT}" ]; then
68 echo "Enabling rc.d symlink for ostiaryd"
69 /etc/init.d/ostiaryd enable
74 define Package/ostiary/prerm
76 # check if we are on real system
77 if [ -z "$${IPKG_INSTROOT}" ]; then
78 /etc/init.d/ostiaryd stop
79 echo "Removing rc.d symlink for ostiaryd"
80 /etc/init.d/ostiaryd disable
81 echo "Any config backups and scripts you created are not removed automatically."
82 echo "To finish cleanup, backup any files you want to keep, then run rm -f /etc/ostiaryd"
88 $(eval $(call BuildPackage,ostiary))