-$(IPKG_MARADNS): $(PKG_BUILD_DIR)/$(PKG_NAME)
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_MARADNS) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
- mkdir -p $(IDIR_MARADNS)/usr/bin
- mkdir -p $(IDIR_MARADNS)/usr/sbin
- cp $(PKG_BUILD_DIR)/server/maradns $(IDIR_MARADNS)/usr/sbin/
- cp $(PKG_BUILD_DIR)/tuzona/getzone $(IDIR_MARADNS)/usr/bin/
- cp $(PKG_BUILD_DIR)/tuzona/zoneserver $(IDIR_MARADNS)/usr/sbin/
- cp $(PKG_BUILD_DIR)/tools/askmara $(IDIR_MARADNS)/usr/bin/
- $(STRIP) $(IDIR_MARADNS)/usr/sbin/*
- $(STRIP) $(IDIR_MARADNS)/usr/bin/*
- cp -a ./files/* $(IDIR_MARADNS)/
- find $(IDIR_MARADNS) -name CVS | xargs rm -rf
- echo "/etc/maradns/maradnsrc" > $(IDIR_MARADNS)/CONTROL/conffiles
- chmod 755 $(IDIR_MARADNS)/etc/init.d/*
- mkdir -p $(PACKAGE_DIR)
+$(IPKG_MARADNS):
+ install -d -m0755 $(IDIR_MARADNS)/etc
+ install -m0644 ./files/mararc $(IDIR_MARADNS)/etc/mararc
+ install -d -m0755 $(IDIR_MARADNS)/etc/init.d
+ install -m0755 ./files/maradns.init $(IDIR_MARADNS)/etc/init.d/S60maradns
+ install -d -m0755 $(IDIR_MARADNS)/usr/bin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone} $(IDIR_MARADNS)/usr/bin/
+ install -d -m0755 $(IDIR_MARADNS)/usr/sbin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(IDIR_MARADNS)/usr/sbin/
+ $(RSTRIP) $(IDIR_MARADNS)