Changeset d419478 in freewrt for package/samba/Makefile


Ignore:
Timestamp:
Jul 21, 2006, 1:56:32 AM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
50d34d3
Parents:
2029b2e
Message:
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/samba/Makefile

    r2029b2e rd419478  
    99        ftp://ftp.easynet.be/samba/stable
    1010PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    11 PKG_CAT:=zcat
    12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    1411
    1512include $(TOPDIR)/package/rules.mk
     
    1815$(eval $(call PKG_template,SAMBA_CLIENT,samba-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    1916
    20 $(PKG_BUILD_DIR)/.configured:
     17$(WRKBUILD)/.configured:
    2118        touch $@
    2219
    23 $(PKG_BUILD_DIR)/.built:
    24         rm -rf $(PKG_INSTALL_DIR)
    25         mkdir -p $(PKG_INSTALL_DIR)
    26         (cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \
     20$(WRKBUILD)/.built:
     21        rm -rf $(WRKINST)
     22        mkdir -p $(WRKINST)
     23        (cd $(WRKBUILD)/source ; rm -rf config.{cache,status} ; \
    2724                ./configure \
    2825                        --program-prefix="" \
     
    4542                        --with-privatedir=/etc/samba \
    4643        );
    47         $(MAKE) -C $(PKG_BUILD_DIR)/source \
     44        $(MAKE) -C $(WRKBUILD)/source \
    4845                bin/make_smbcodepage bin/make_unicodemap
    49         (cd $(PKG_BUILD_DIR)/source/bin ; \
     46        (cd $(WRKBUILD)/source/bin ; \
    5047                mv -f make_smbcodepage make_smbcodepage.old ; \
    5148                mv -f make_unicodemap make_unicodemap.old ; \
    5249        );
    5350
    54         $(MAKE) -C $(PKG_BUILD_DIR)/source \
     51        $(MAKE) -C $(WRKBUILD)/source \
    5552                clean
    5653
    57         (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
     54        (cd $(WRKBUILD)/source; rm -rf config.{cache,status}; \
    5855                $(TARGET_CONFIGURE_OPTS) \
    5956                CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
     
    122119                        --with-syslog \
    123120        );
    124         $(MAKE) -C $(PKG_BUILD_DIR)/source \
     121        $(MAKE) -C $(WRKBUILD)/source \
    125122                $(TARGET_CONFIGURE_OPTS) \
    126123                CODEPAGEDIR="/usr/share/samba" \
    127124                all shared
    128         (cd $(PKG_BUILD_DIR)/source/bin ; \
     125        (cd $(WRKBUILD)/source/bin ; \
    129126                mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \
    130127                mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \
    131128        );
    132         mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba
    133         mkdir -p $(PKG_INSTALL_DIR)/var/log
    134         $(MAKE) -C $(PKG_BUILD_DIR)/source \
    135                 BASEDIR="$(PKG_INSTALL_DIR)/usr" \
    136                 BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
    137                 SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
    138                 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
    139                 VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \
    140                 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
    141                 CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \
    142                 PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \
    143                 SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
    144                 LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \
    145                 SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
    146                 CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \
     129        mkdir -p $(WRKINST)/usr/share/samba
     130        mkdir -p $(WRKINST)/var/log
     131        $(MAKE) -C $(WRKBUILD)/source \
     132                BASEDIR="$(WRKINST)/usr" \
     133                BINDIR="$(WRKINST)/usr/bin" \
     134                SBINDIR="$(WRKINST)/usr/bin" \
     135                LIBDIR="$(WRKINST)/usr/lib" \
     136                VARDIR="$(WRKINST)/var/log/samba" \
     137                MANDIR="$(WRKINST)/usr/share/man" \
     138                CONFIGDIR="$(WRKINST)/etc/samba" \
     139                PRIVATEDIR="$(WRKINST)/etc/samba" \
     140                SWATDIR="$(WRKINST)/usr/swat" \
     141                LOCKDIR="$(WRKINST)/var/run/samba" \
     142                SAMBABOOK="$(WRKINST)/usr/swat/using_samba" \
     143                CODEPAGEDIR="$(WRKINST)/usr/share/samba" \
    147144                install
    148145        touch $@
     
    154151        install -m0644 ./files/smb.conf $(IDIR_SAMBA)/etc/samba/smb.conf
    155152        install -d -m0755 $(IDIR_SAMBA)/usr/bin
    156         install -m0755 $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(IDIR_SAMBA)/usr/bin/smbpasswd
     153        install -m0755 $(WRKBUILD)/source/bin/smbpasswd.shared $(IDIR_SAMBA)/usr/bin/smbpasswd
    157154        install -d -m0755 $(IDIR_SAMBA)/usr/lib
    158         install -m0755 $(PKG_BUILD_DIR)/source/bin/libsmb.so $(IDIR_SAMBA)/usr/lib/
     155        install -m0755 $(WRKBUILD)/source/bin/libsmb.so $(IDIR_SAMBA)/usr/lib/
    159156        install -d -m0755 $(IDIR_SAMBA)/usr/sbin
    160         install -m0755 $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(IDIR_SAMBA)/usr/sbin/nmbd
    161         install -m0755 $(PKG_BUILD_DIR)/source/bin/smbd.shared $(IDIR_SAMBA)/usr/sbin/smbd
     157        install -m0755 $(WRKBUILD)/source/bin/nmbd.shared $(IDIR_SAMBA)/usr/sbin/nmbd
     158        install -m0755 $(WRKBUILD)/source/bin/smbd.shared $(IDIR_SAMBA)/usr/sbin/smbd
    162159        install -d -m0755 $(IDIR_SAMBA)/usr/share/samba
    163         install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(IDIR_SAMBA)/usr/share/samba/
    164         install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850} $(IDIR_SAMBA)/usr/share/samba/
     160        install -m0644 $(WRKINST)/usr/share/samba/codepage.{437,850} $(IDIR_SAMBA)/usr/share/samba/
     161        install -m0644 $(WRKINST)/usr/share/samba/unicode_map.{437,850} $(IDIR_SAMBA)/usr/share/samba/
    165162        $(RSTRIP) $(IDIR_SAMBA)
    166163        $(IPKG_BUILD) $(IDIR_SAMBA) $(PACKAGE_DIR)
     
    168165$(IPKG_SAMBA_CLIENT):
    169166        install -d -m0755 $(IDIR_SAMBA_CLIENT)/usr/bin
    170         install -m0755 $(PKG_INSTALL_DIR)/usr/bin/smbclient $(IDIR_SAMBA_CLIENT)/usr/bin/
     167        install -m0755 $(WRKINST)/usr/bin/smbclient $(IDIR_SAMBA_CLIENT)/usr/bin/
    171168        $(RSTRIP) $(IDIR_SAMBA_CLIENT)
    172169        $(IPKG_BUILD) $(IDIR_SAMBA_CLIENT) $(PACKAGE_DIR)
    173170
    174171mostlyclean:
    175         -$(MAKE) -C $(PKG_BUILD_DIR) clean
    176         rm -f $(PKG_BUILD_DIR)/.built
     172        -$(MAKE) -C $(WRKBUILD) clean
     173        rm -f $(WRKBUILD)/.built
    177174
Note: See TracChangeset for help on using the changeset viewer.