123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- include $(TOPDIR)/rules.mk
- PKG_NAME:=ffpb-banner
- PKG_VERSION:=1
- PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
- PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
- include $(INCLUDE_DIR)/package.mk
- define Package/ffpb-banner
- SECTION:=ffpb
- CATEGORY:=Customization
- TITLE:=Banner file replacement
- DEPENDS:=+gluon-core +busybox
- MAINTAINER:=Freifunk Paderborn <maschinenraum@paderborn.freifunk.net>
- URL:=https://git.c3pb.de/freifunk-pb/ffpb-packages
- SOURCE:=git@git.c3pb.de:freifunk-pb/ffpb-packages.git
- endef
- define Package/ffpb-banner/description
- Banner file replacement
- endef
- define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
- endef
- define Build/Configure
- endef
- define Build/Compile
- endef
- define Package/ffpb-banner/preinst
- #!/bin/sh
- cd "$${IPKG_INSTROOT}/etc/"
- if [ -h "./banner" ] ; then
- /bin/rm "./banner"
- elif [ -f "./banner" ] ; then
- /bin/mv "./banner" "./banner.openwrt"
- fi
- /bin/ln -s "./banner.openwrt" "./banner"
- exit 0
- endef
- define Package/ffpb-banner/postinst
- #!/bin/sh
- cd "$${IPKG_INSTROOT}/etc/"
- [ -h "./banner" ] && /bin/rm -f "./banner"
- /bin/ln -s "./banner.ffpb" "./banner"
- exit $$?
- endef
- define Package/ffpb-banner/prerm
- #!/bin/sh
- cd "$${IPKG_INSTROOT}/etc/"
- if [ -h "./banner" ] ; then
- [[ "$$(readlink -n ./banner)" == "./banner.ffpb" ]] && \
- /bin/rm -f "./banner" && \
- [ -f "./banner.openwrt" ] && \
- /bin/ln -s "./banner.openwrt" "./banner"
- fi
- exit 0
- endef
- define Package/ffpb-banner/install
- $(INSTALL_DIR) $(1)/etc/
- $(INSTALL_DATA) ./files/etc/banner.ffpb $(1)/etc/
- endef
- $(eval $(call BuildPackage,ffpb-banner))
|