Changeset 4218


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

port sqlite3 to buildroot-ng

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

Legend:

Unmodified
Added
Removed
  • packages/libs/sqlite3/Makefile

    r3594 r4218  
     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:=3.3.3 
    713PKG_RELEASE:=1 
     14 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     17PKG_SOURCE_URL:=http://www.sqlite.org/ 
    818PKG_MD5SUM:=eb5d9d7e7853b3af78e767d709b7fced 
    9  
    10 PKG_SOURCE_URL:=http://www.sqlite.org/ 
    11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1219PKG_CAT:=zcat 
    1320 
    14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(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,LIBSQLITE,libsqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    20 $(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     26define Package/libsqlite3 
     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/sqlite3-cli 
     39  SECTION:=libs 
     40  CATEGORY:=Libraries 
     41  DEPENDS:=libsqlite3 +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)" \ 
     
    5687                        --disable-tcl \ 
    5788        ); 
    58         touch $@ 
     89endef 
    5990 
    60 $(PKG_BUILD_DIR)/.built: 
     91define Build/Compile 
    6192        rm -rf $(PKG_INSTALL_DIR) 
    6293        mkdir -p $(PKG_INSTALL_DIR) 
     
    6495                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    6596                all install 
    66         touch $@ 
     97endef 
    6798 
    68 $(IPKG_LIBSQLITE): 
    69         install -d -m0755 $(IDIR_LIBSQLITE)/usr/lib 
    70         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(IDIR_LIBSQLITE)/usr/lib/ 
    71         $(RSTRIP) $(IDIR_LIBSQLITE) 
    72         $(IPKG_BUILD) $(IDIR_LIBSQLITE) $(PACKAGE_DIR) 
     99define Package/libsqlite3/install 
     100        install -d -m0755 $(1)/usr/lib 
     101        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/ 
     102endef 
    73103 
    74 $(IPKG_SQLITE_CLI): 
    75         install -d -m0755 $(IDIR_SQLITE_CLI)/usr/bin 
    76         $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(IDIR_SQLITE_CLI)/usr/bin/ 
    77         $(RSTRIP) $(IDIR_SQLITE_CLI) 
    78         $(IPKG_BUILD) $(IDIR_SQLITE_CLI) $(PACKAGE_DIR) 
     104define Package/sqlite3-cli/install 
     105        install -d -m0755 $(1)/usr/bin 
     106        $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/ 
     107endef 
    79108 
    80 $(STAGING_DIR)/usr/lib/libsqlite3.so: $(PKG_BUILD_DIR)/.built 
     109define Build/InstallDev 
    81110        mkdir -p $(STAGING_DIR)/usr/include 
    82111        $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(STAGING_DIR)/usr/include/ 
     
    85114        mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig 
    86115        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(STAGING_DIR)/usr/lib/pkgconfig/ 
    87         touch $@ 
     116endef 
    88117 
    89 install-dev: $(STAGING_DIR)/usr/lib/libsqlite3.so 
    90  
    91 uninstall-dev: 
     118define Build/UninstallDev 
    92119        rm -rf \ 
    93120                $(STAGING_DIR)/usr/include/sqlite3.h \ 
    94121                $(STAGING_DIR)/usr/lib/libsqlite3.{a,so*} \ 
    95                 $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc \ 
     122                $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc 
     123endef 
    96124 
    97 compile-targets: install-dev 
    98 clean-targets: uninstall-dev 
    99  
    100 mostlyclean: 
    101         -$(MAKE) -C $(PKG_BUILD_DIR) clean 
    102         rm -f $(PKG_BUILD_DIR)/.built  
     125$(eval $(call BuildPackage,libsqlite3)) 
     126$(eval $(call BuildPackage,sqlite3-cli)) 
Note: See TracChangeset for help on using the changeset viewer.