Ticket #10052: freedius_split_packages.patch

File freedius_split_packages.patch, 3.4 KB (added by crissi99@…, 5 years ago)

patch for splitting freeradius into freeradius, freeradius-libs, freeradius-dictionary

  • freeradius/Makefile

    diff -burN new/freeradius/Makefile orig/freeradius/Makefile
    old new  
    2929 
    3030define Package/freeradius 
    3131  $(call Package/freeradius/Default) 
    32   DEPENDS:=+libltdl +libopenssl +libpthread +libreadline 
     32  DEPENDS:=+libltdl +libopenssl +libpthread +libreadline +freeradius-libs +freeradius-dictionary 
    3333  TITLE:=A flexible RADIUS server 
    3434  MENU:=1 
    3535endef 
    3636 
     37define Package/freeradius-libs 
     38  $(call Package/freeradius/Default) 
     39  TITLE:=freeradius libraries 
     40endef 
     41 
     42define Package/freeradius-dictionary 
     43  $(call Package/freeradius/Default) 
     44  TITLE:=freeradius dictionaries 
     45endef 
     46 
    3747define Package/freeradius/conffiles 
    38 /etc/freeradius/clients.conf 
    3948/etc/freeradius/radiusd.conf 
    4049endef 
    4150 
     51define Package/freeradius-utils/conffiles 
     52/etc/freeradius/clients.conf 
     53endef 
     54 
    4255define Package/freeradius-democerts 
    4356  $(call Package/freeradius/Default) 
    4457  DEPENDS:=freeradius 
     
    202215 
    203216define Package/freeradius-utils 
    204217  $(call Package/freeradius/Default) 
    205   DEPENDS:=freeradius 
     218  DEPENDS:=freeradius-libs freeradius-dictionary 
    206219  TITLE:=Misc. client utilities 
    207220endef 
    208221 
     
    329342 
    330343define Package/freeradius/install 
    331344        $(INSTALL_DIR) $(1)/etc/freeradius 
    332         for f in clients.conf dictionary radiusd.conf; do \ 
     345        for f in radiusd.conf; do \ 
    333346                $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} $(1)/etc/freeradius/ ; \ 
    334347        done 
     348         
     349        $(INSTALL_DIR) $(1)/usr/sbin 
     350        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/ 
     351        $(INSTALL_DIR) $(1)/etc/init.d 
     352        $(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd 
     353endef 
     354 
     355define Package/freeradius-libs/install 
     356        $(INSTALL_DIR) $(1)/usr/lib/freeradius 
     357        $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so $(1)/usr/lib/ 
     358endef 
     359 
     360define Package/freeradius-dictionary/install 
    335361        $(INSTALL_DIR) $(1)/usr/share/freeradius 
    336362        $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius/ 
    337363        $(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius/dictionary 
     
    339365                $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$$$${f} $(1)/usr/share/freeradius/ ; \ 
    340366                $(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr/share/freeradius/dictionary ; \ 
    341367        done 
    342         $(INSTALL_DIR) $(1)/usr/lib/freeradius 
    343         $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so $(1)/usr/lib/ 
    344         $(INSTALL_DIR) $(1)/usr/sbin 
    345         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/ 
    346         $(INSTALL_DIR) $(1)/etc/init.d 
    347         $(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd 
    348368endef 
    349369 
    350370define Package/freeradius-democerts/install 
     
    357377endef 
    358378 
    359379define Package/freeradius-utils/install 
     380        $(INSTALL_DIR) $(1)/etc/freeradius 
     381        for f in clients.conf dictionary; do \ 
     382                $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} $(1)/etc/freeradius/ ; \ 
     383        done 
    360384        $(INSTALL_DIR) $(1)/usr/bin 
    361385        for f in radclient radeapclient; do \ 
    362386                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \ 
    363387        done 
    364388endef 
    365389 
     390 
     391 
     392 
    366393define BuildPlugin 
    367394  define Package/$(1)/install 
    368395        [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib 
     
    379406endef 
    380407 
    381408$(eval $(call BuildPackage,freeradius)) 
     409$(eval $(call BuildPackage,freeradius-libs)) 
     410$(eval $(call BuildPackage,freeradius-dictionary)) 
    382411$(eval $(call BuildPackage,freeradius-democerts)) 
    383412$(eval $(call BuildPlugin,freeradius-mod-chap,rlm_chap,)) 
    384413$(eval $(call BuildPlugin,freeradius-mod-detail,rlm_detail,))