Changeset 4217


Ignore:
Timestamp:
2006-07-22T18:42:34+02:00 (12 years ago)
Author:
nico
Message:

port sqlite2 to buildroot-ng

Location:
packages/libs/sqlite2
Files:
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • packages/libs/sqlite2/Makefile

    r3112 r4217  
     1#  
     2# Copyright (C) 2006 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
    17# $Id$ 
    28 
     
    612PKG_VERSION:=2.8.17 
    713PKG_RELEASE:=1 
     14 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION) 
     16PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz 
     17PKG_SOURCE_URL:=http://www.sqlite.org/ 
    818PKG_MD5SUM:=838dbac20b56d2c4292e98848505a05b 
    9  
    10 PKG_SOURCE_URL:=http://www.sqlite.org/ 
    11 PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz 
    1219PKG_CAT:=zcat 
    1320 
    14 PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION) 
    1521PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
     22PKG_BUILDDEP:=ncurses readline 
    1623 
    17 include $(TOPDIR)/package/rules.mk 
     24include $(INCLUDE_DIR)/package.mk 
    1825 
    19 $(eval $(call PKG_template,LIBSQLITE2,libsqlite2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    20 $(eval $(call PKG_template,SQLITE2_CLI,sqlite2-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     26define Package/libsqlite2 
     27  SECTION:=libs 
     28  CATEGORY:=Libraries 
     29  TITLE:=Self-contained SQL database engine 
     30  DESCRIPTION:=Self-contained, embeddable, zero-configuration SQL database engine.\\\ 
     31    SQLite is a small C library that implements a self-contained, embeddable, \\\ 
     32    zero-configuration SQL database engine.\\\ 
     33    \\\ 
     34    This package contains the shared library, needed by other programs. 
     35  URL:=http://www.sqlite.org/ 
     36endef 
    2137 
    22 $(PKG_BUILD_DIR)/.configured: 
    23         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
     38define Package/sqlite2-cli 
     39  SECTION:=libs 
     40  CATEGORY:=Libraries 
     41  DEPENDS:=libsqlite2 +libncurses +libreadline 
     42  TITLE:=Command line interface for SQLite 
     43  DESCRIPTION:=Command line interface for SQLite.\\\ 
     44    SQLite is a small C library that implements a self-contained, embeddable, \\\ 
     45    zero-configuration SQL database engine.\\\ 
     46    \\\ 
     47    This package contains a terminal-based front-end to the SQLite library \\\ 
     48    that can evaluate queries interactively and display the results in \\\ 
     49    multiple formats. 
     50  URL:=http://www.sqlite.org/ 
     51endef 
     52 
     53define Build/Configure 
     54        (cd $(PKG_BUILD_DIR); rm -f config.cache; \ 
    2455                $(TARGET_CONFIGURE_OPTS) \ 
    2556                CFLAGS="$(TARGET_CFLAGS)" \ 
     
    5586                        --enable-static \ 
    5687        ); 
    57         touch $@ 
     88endef 
    5889 
    59 $(PKG_BUILD_DIR)/.built: 
     90define Build/Compile 
    6091        rm -rf $(PKG_INSTALL_DIR) 
    6192        mkdir -p $(PKG_INSTALL_DIR) 
     
    6394                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    6495                all install 
    65         touch $@ 
     96endef 
    6697 
    67 $(IPKG_LIBSQLITE2): 
    68         install -d -m0755 $(IDIR_LIBSQLITE2)/usr/lib 
    69         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(IDIR_LIBSQLITE2)/usr/lib/ 
    70         $(RSTRIP) $(IDIR_LIBSQLITE2) 
    71         $(IPKG_BUILD) $(IDIR_LIBSQLITE2) $(PACKAGE_DIR) 
     98define Package/libsqlite2/install 
     99        install -d -m0755 $(1)/usr/lib 
     100        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(1)/usr/lib/ 
     101endef 
    72102 
    73 $(IPKG_SQLITE2_CLI): 
    74         install -d -m0755 $(IDIR_SQLITE2_CLI)/usr/bin 
    75         $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(IDIR_SQLITE2_CLI)/usr/bin/ 
    76         $(RSTRIP) $(IDIR_SQLITE2_CLI) 
    77         $(IPKG_BUILD) $(IDIR_SQLITE2_CLI) $(PACKAGE_DIR) 
     103define Package/sqlite2-cli/install 
     104        install -d -m0755 $(1)/usr/bin 
     105        $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(1)/usr/bin/ 
     106endef 
    78107 
    79 $(STAGING_DIR)/usr/lib/libsqlite.so: $(PKG_BUILD_DIR)/.built 
     108define Build/InstallDev 
    80109        mkdir -p $(STAGING_DIR)/usr/include 
    81110        $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(STAGING_DIR)/usr/include/ 
     
    84113        mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig 
    85114        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(STAGING_DIR)/usr/lib/pkgconfig/ 
    86         touch $@ 
     115endef 
    87116 
    88 install-dev: $(STAGING_DIR)/usr/lib/libsqlite.so 
    89  
    90 uninstall-dev: 
     117define Build/UninstallDev 
    91118        rm -rf \ 
    92119                $(STAGING_DIR)/usr/include/sqlite.h \ 
    93120                $(STAGING_DIR)/usr/lib/libsqlite.{a,so*} \ 
    94                 $(STAGING_DIR)/usr/lib/pkgconfig/sqlite.pc \ 
     121                $(STAGING_DIR)/usr/lib/pkgconfig/sqlite.pc 
     122endef 
    95123 
    96 compile-targets: install-dev 
    97 clean-targets: uninstall-dev 
    98  
    99 mostlyclean: 
    100         -$(MAKE) -C $(PKG_BUILD_DIR) clean 
    101         rm -f $(PKG_BUILD_DIR)/.built  
     124$(eval $(call BuildPackage,libsqlite2)) 
     125$(eval $(call BuildPackage,sqlite2-cli)) 
Note: See TracChangeset for help on using the changeset viewer.