summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am92
-rw-r--r--configure.ac18
-rw-r--r--libopkg/Makefile.am76
-rw-r--r--libopkg/args.c (renamed from args.c)0
-rw-r--r--libopkg/args.h (renamed from args.h)0
-rw-r--r--libopkg/conffile.c (renamed from conffile.c)0
-rw-r--r--libopkg/conffile.h (renamed from conffile.h)0
-rw-r--r--libopkg/conffile_list.c (renamed from conffile_list.c)0
-rw-r--r--libopkg/conffile_list.h (renamed from conffile_list.h)0
-rw-r--r--libopkg/file_util.c (renamed from file_util.c)0
-rw-r--r--libopkg/file_util.h (renamed from file_util.h)0
-rw-r--r--libopkg/hash_table.c (renamed from hash_table.c)0
-rw-r--r--libopkg/hash_table.h (renamed from hash_table.h)0
-rw-r--r--libopkg/includes.h (renamed from includes.h)0
-rw-r--r--libopkg/libopkg.c (renamed from libopkg.c)0
-rw-r--r--libopkg/libopkg.h (renamed from libopkg.h)0
-rw-r--r--libopkg/md5.c (renamed from md5.c)0
-rw-r--r--libopkg/md5.h (renamed from md5.h)0
-rw-r--r--libopkg/nv_pair.c (renamed from nv_pair.c)0
-rw-r--r--libopkg/nv_pair.h (renamed from nv_pair.h)0
-rw-r--r--libopkg/nv_pair_list.c (renamed from nv_pair_list.c)0
-rw-r--r--libopkg/nv_pair_list.h (renamed from nv_pair_list.h)0
-rw-r--r--libopkg/opkg.c (renamed from opkg.c)0
-rw-r--r--libopkg/opkg.h (renamed from opkg.h)0
-rw-r--r--libopkg/opkg_cmd.c (renamed from opkg_cmd.c)0
-rw-r--r--libopkg/opkg_cmd.h (renamed from opkg_cmd.h)0
-rw-r--r--libopkg/opkg_conf.c (renamed from opkg_conf.c)0
-rw-r--r--libopkg/opkg_conf.h (renamed from opkg_conf.h)0
-rw-r--r--libopkg/opkg_configure.c (renamed from opkg_configure.c)0
-rw-r--r--libopkg/opkg_configure.h (renamed from opkg_configure.h)0
-rw-r--r--libopkg/opkg_download.c (renamed from opkg_download.c)0
-rw-r--r--libopkg/opkg_download.h (renamed from opkg_download.h)0
-rw-r--r--libopkg/opkg_extract_test.c (renamed from opkg_extract_test.c)0
-rw-r--r--libopkg/opkg_hash_test.c (renamed from opkg_hash_test.c)0
-rw-r--r--libopkg/opkg_install.c (renamed from opkg_install.c)0
-rw-r--r--libopkg/opkg_install.h (renamed from opkg_install.h)0
-rw-r--r--libopkg/opkg_message.c (renamed from opkg_message.c)0
-rw-r--r--libopkg/opkg_message.h (renamed from opkg_message.h)0
-rw-r--r--libopkg/opkg_remove.c (renamed from opkg_remove.c)0
-rw-r--r--libopkg/opkg_remove.h (renamed from opkg_remove.h)0
-rw-r--r--libopkg/opkg_state.c (renamed from opkg_state.c)0
-rw-r--r--libopkg/opkg_state.h (renamed from opkg_state.h)0
-rw-r--r--libopkg/opkg_upgrade.c (renamed from opkg_upgrade.c)0
-rw-r--r--libopkg/opkg_upgrade.h (renamed from opkg_upgrade.h)0
-rw-r--r--libopkg/opkg_utils.c (renamed from opkg_utils.c)0
-rw-r--r--libopkg/opkg_utils.h (renamed from opkg_utils.h)0
-rw-r--r--libopkg/pkg.c (renamed from pkg.c)0
-rw-r--r--libopkg/pkg.h (renamed from pkg.h)0
-rw-r--r--libopkg/pkg_depends.c (renamed from pkg_depends.c)0
-rw-r--r--libopkg/pkg_depends.h (renamed from pkg_depends.h)0
-rw-r--r--libopkg/pkg_dest.c (renamed from pkg_dest.c)0
-rw-r--r--libopkg/pkg_dest.h (renamed from pkg_dest.h)0
-rw-r--r--libopkg/pkg_dest_list.c (renamed from pkg_dest_list.c)0
-rw-r--r--libopkg/pkg_dest_list.h (renamed from pkg_dest_list.h)0
-rw-r--r--libopkg/pkg_extract.c (renamed from pkg_extract.c)0
-rw-r--r--libopkg/pkg_extract.h (renamed from pkg_extract.h)0
-rw-r--r--libopkg/pkg_hash.c (renamed from pkg_hash.c)0
-rw-r--r--libopkg/pkg_hash.h (renamed from pkg_hash.h)0
-rw-r--r--libopkg/pkg_parse.c (renamed from pkg_parse.c)0
-rw-r--r--libopkg/pkg_parse.h (renamed from pkg_parse.h)0
-rw-r--r--libopkg/pkg_src.c (renamed from pkg_src.c)0
-rw-r--r--libopkg/pkg_src.h (renamed from pkg_src.h)0
-rw-r--r--libopkg/pkg_src_list.c (renamed from pkg_src_list.c)0
-rw-r--r--libopkg/pkg_src_list.h (renamed from pkg_src_list.h)0
-rw-r--r--libopkg/pkg_vec.c (renamed from pkg_vec.c)0
-rw-r--r--libopkg/pkg_vec.h (renamed from pkg_vec.h)0
-rw-r--r--libopkg/sprintf_alloc.c (renamed from sprintf_alloc.c)0
-rw-r--r--libopkg/sprintf_alloc.h (renamed from sprintf_alloc.h)0
-rw-r--r--libopkg/str_list.c (renamed from str_list.c)0
-rw-r--r--libopkg/str_list.h (renamed from str_list.h)0
-rw-r--r--libopkg/str_util.c (renamed from str_util.c)0
-rw-r--r--libopkg/str_util.h (renamed from str_util.h)0
-rw-r--r--libopkg/user.c (renamed from user.c)0
-rw-r--r--libopkg/user.h (renamed from user.h)0
-rw-r--r--libopkg/void_list.c (renamed from void_list.c)0
-rw-r--r--libopkg/void_list.h (renamed from void_list.h)0
-rw-r--r--libopkg/xregex.c (renamed from xregex.c)0
-rw-r--r--libopkg/xregex.h (renamed from xregex.h)0
-rw-r--r--libopkg/xsystem.c (renamed from xsystem.c)0
-rw-r--r--libopkg/xsystem.h (renamed from xsystem.h)0
-rw-r--r--src/Makefile.am10
-rw-r--r--src/opkg-frontend.c (renamed from opkg-frontend.c)0
82 files changed, 103 insertions, 93 deletions
diff --git a/Makefile.am b/Makefile.am
index 256c254..69b61f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,11 @@
#SUBDIRS = etc replace familiar libbb
-SUBDIRS = etc familiar libbb
+SUBDIRS = etc familiar libbb libopkg src
HOST_CPU=@host_cpu@
BUILD_CPU=@build_cpu@
OPKGLIBDIR=@opkglibdir@
ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\"
-bin_PROGRAMS = opkg-cl
-
-lib_LTLIBRARIES = libopkg.la
bin_SCRIPTS = update-alternatives
@@ -18,71 +15,7 @@ intercept_DATA = intercept/ldconfig intercept/depmod intercept/update-modules
install-data-hook:
chmod +x $(DESTDIR)$(datadir)/opkg/intercept/*
-# opkg_LDADD = libbb/libbb.a replace/libreplace.a
-
-#opkg_cl_LDADD = libopkg.la libbb/libbb.la replace/libreplace.a
-opkg_cl_LDADD = libopkg.la libbb/libbb.la
-
-libopkg_includedir=$(includedir)/libopkg
-
-libopkg_include_HEADERS= \
- args.h \
- conffile.h \
- conffile_list.h \
- config.h \
- hash_table.h \
- includes.h \
- opkg_conf.h \
- opkg.h \
- opkg_message.h \
- opkg_state.h \
- nv_pair.h \
- nv_pair_list.h \
- pkg_depends.h \
- pkg_dest.h \
- pkg_dest_list.h \
- pkg.h \
- pkg_hash.h \
- pkg_src.h \
- pkg_src_list.h \
- pkg_vec.h \
- str_list.h \
- void_list.h \
- libopkg.h
-
-#\ replace/replace.h
-
-#libopkg_la_LIBADD = libbb/libbb.la replace/libreplace.a
-libopkg_la_LIBADD = libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
-
-opkg_core_sources = args.c args.h opkg.c \
- user.c user.h
-opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\
- user.c user.h opkg_state.c opkg_state.h
-opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
- opkg_configure.c opkg_configure.h \
- opkg_download.c opkg_download.h \
- opkg_install.c opkg_install.h \
- opkg_upgrade.c opkg_upgrade.h \
- opkg_remove.c opkg_remove.h
-opkg_db_sources = opkg_conf.c opkg_conf.h \
- opkg_utils.c opkg_utils.h pkg.c pkg.h hash_table.h \
- pkg_depends.c pkg_depends.h pkg_extract.c pkg_extract.h \
- hash_table.c pkg_hash.c pkg_hash.h pkg_parse.c pkg_parse.h \
- pkg_vec.c pkg_vec.h
-opkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \
- nv_pair.c nv_pair.h nv_pair_list.c nv_pair_list.h \
- pkg_dest.c pkg_dest.h pkg_dest_list.c pkg_dest_list.h \
- pkg_src.c pkg_src.h pkg_src_list.c pkg_src_list.h \
- str_list.c str_list.h void_list.c void_list.h
-opkg_util_sources = file_util.c file_util.h opkg_message.h opkg_message.c md5.c md5.h \
- sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
- xregex.c xregex.h xsystem.c xsystem.h
-
-# opkg_SOURCES = $(opkg_core_sources) $(opkg_cmd_sources) $(opkg_db_sources) \
-# $(opkg_util_sources) $(opkg_list_sources)
-
-EXTRA_DIST = opkg.c update-alternatives $(intercept_DATA)
+EXTRA_DIST = update-alternatives $(intercept_DATA)
MAINTAINERCLEANFILES= \
configure \
@@ -93,26 +26,5 @@ MAINTAINERCLEANFILES= \
.Makefile.am.swp \
aclocal.m4
-libopkg_la_SOURCES = $(opkg_libcore_sources) $(opkg_cmd_sources) $(opkg_db_sources) \
- $(opkg_util_sources) $(opkg_list_sources)
-
-opkg_cl_SOURCES = opkg-frontend.c
-
-libopkg_la_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
-
-opkg_CFLAGS = $(ALL_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
-
-opkg_cl_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS)
-
-noinst_PROGRAMS = opkg_hash_test opkg_extract_test
-
-opkg_hash_test_LDADD = libbb/libbb.la
-opkg_hash_test_SOURCES = opkg_hash_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources)
-opkg_hash_test_CFLAGS = $(ALL_CFLAGS)
-
-opkg_extract_test_LDADD = libbb/libbb.la
-opkg_extract_test_SOURCES = opkg_extract_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources)
-opkg_extract_test_CFLAGS = $(ALL_CFLAGS)
-
package: all-recursive
STRIPPROG=$(STRIP) familiar/rules INSTALL=$$PWD/install-sh binary-arch
diff --git a/configure.ac b/configure.ac
index 3dd5dd9..c98db77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script
-AC_INIT(opkg.c)
+AC_INIT(libopkg/opkg.c)
AM_INIT_AUTOMAKE([opkg], [0.99.163])
-AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(libopkg/config.h)
AC_CANONICAL_HOST
@@ -126,4 +126,16 @@ fi
AC_SUBST(opkglibdir)
-AC_OUTPUT(Makefile etc/Makefile familiar/Makefile familiar/control familiar/control-unstripped familiar/libopkg-control familiar/libopkg-dev-control libbb/Makefile libopkg.pc opkg.h)
+AC_OUTPUT(
+ Makefile
+ libopkg/Makefile
+ src/Makefile
+ etc/Makefile
+ familiar/Makefile
+ familiar/control
+ familiar/control-unstripped
+ familiar/libopkg-control
+ familiar/libopkg-dev-control
+ libbb/Makefile
+ libopkg.pc
+ opkg.h)
diff --git a/libopkg/Makefile.am b/libopkg/Makefile.am
new file mode 100644
index 0000000..ad4de4d
--- /dev/null
+++ b/libopkg/Makefile.am
@@ -0,0 +1,76 @@
+
+ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_builddir)
+
+libopkg_includedir=$(includedir)/libopkg
+
+libopkg_include_HEADERS= \
+ args.h \
+ conffile.h \
+ conffile_list.h \
+ config.h \
+ hash_table.h \
+ includes.h \
+ opkg_conf.h \
+ opkg.h \
+ opkg_message.h \
+ opkg_state.h \
+ nv_pair.h \
+ nv_pair_list.h \
+ pkg_depends.h \
+ pkg_dest.h \
+ pkg_dest_list.h \
+ pkg.h \
+ pkg_hash.h \
+ pkg_src.h \
+ pkg_src_list.h \
+ pkg_vec.h \
+ str_list.h \
+ void_list.h \
+ libopkg.h
+
+libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
+
+opkg_core_sources = args.c args.h opkg.c \
+ user.c user.h
+opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\
+ user.c user.h opkg_state.c opkg_state.h
+opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
+ opkg_configure.c opkg_configure.h \
+ opkg_download.c opkg_download.h \
+ opkg_install.c opkg_install.h \
+ opkg_upgrade.c opkg_upgrade.h \
+ opkg_remove.c opkg_remove.h
+opkg_db_sources = opkg_conf.c opkg_conf.h \
+ opkg_utils.c opkg_utils.h pkg.c pkg.h hash_table.h \
+ pkg_depends.c pkg_depends.h pkg_extract.c pkg_extract.h \
+ hash_table.c pkg_hash.c pkg_hash.h pkg_parse.c pkg_parse.h \
+ pkg_vec.c pkg_vec.h
+opkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \
+ nv_pair.c nv_pair.h nv_pair_list.c nv_pair_list.h \
+ pkg_dest.c pkg_dest.h pkg_dest_list.c pkg_dest_list.h \
+ pkg_src.c pkg_src.h pkg_src_list.c pkg_src_list.h \
+ str_list.c str_list.h void_list.c void_list.h
+opkg_util_sources = file_util.c file_util.h opkg_message.h opkg_message.c md5.c md5.h \
+ sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
+ xregex.c xregex.h xsystem.c xsystem.h
+
+libopkg_la_SOURCES = \
+ $(opkg_libcore_sources) \
+ $(opkg_cmd_sources) $(opkg_db_sources) \
+ $(opkg_util_sources) $(opkg_list_sources)
+
+libopkg_la_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
+lib_LTLIBRARIES = libopkg.la
+
+
+noinst_PROGRAMS = opkg_hash_test opkg_extract_test
+
+opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la
+opkg_hash_test_SOURCES = opkg_hash_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources)
+opkg_hash_test_CFLAGS = $(ALL_CFLAGS)
+
+opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.la
+opkg_extract_test_SOURCES = opkg_extract_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources)
+opkg_extract_test_CFLAGS = $(ALL_CFLAGS)
+
+
diff --git a/args.c b/libopkg/args.c
index 99f3e12..99f3e12 100644
--- a/args.c
+++ b/libopkg/args.c
diff --git a/args.h b/libopkg/args.h
index a470778..a470778 100644
--- a/args.h
+++ b/libopkg/args.h
diff --git a/conffile.c b/libopkg/conffile.c
index 5f41cc1..5f41cc1 100644
--- a/conffile.c
+++ b/libopkg/conffile.c
diff --git a/conffile.h b/libopkg/conffile.h
index 130d1d8..130d1d8 100644
--- a/conffile.h
+++ b/libopkg/conffile.h
diff --git a/conffile_list.c b/libopkg/conffile_list.c
index 27d48d5..27d48d5 100644
--- a/conffile_list.c
+++ b/libopkg/conffile_list.c
diff --git a/conffile_list.h b/libopkg/conffile_list.h
index a5daac9..a5daac9 100644
--- a/conffile_list.h
+++ b/libopkg/conffile_list.h
diff --git a/file_util.c b/libopkg/file_util.c
index da8a1cd..da8a1cd 100644
--- a/file_util.c
+++ b/libopkg/file_util.c
diff --git a/file_util.h b/libopkg/file_util.h
index bcfb3cb..bcfb3cb 100644
--- a/file_util.h
+++ b/libopkg/file_util.h
diff --git a/hash_table.c b/libopkg/hash_table.c
index 41877c2..41877c2 100644
--- a/hash_table.c
+++ b/libopkg/hash_table.c
diff --git a/hash_table.h b/libopkg/hash_table.h
index 388a966..388a966 100644
--- a/hash_table.h
+++ b/libopkg/hash_table.h
diff --git a/includes.h b/libopkg/includes.h
index 5a67001..5a67001 100644
--- a/includes.h
+++ b/libopkg/includes.h
diff --git a/libopkg.c b/libopkg/libopkg.c
index c57ad0a..c57ad0a 100644
--- a/libopkg.c
+++ b/libopkg/libopkg.c
diff --git a/libopkg.h b/libopkg/libopkg.h
index 3430e1c..3430e1c 100644
--- a/libopkg.h
+++ b/libopkg/libopkg.h
diff --git a/md5.c b/libopkg/md5.c
index 9cbc228..9cbc228 100644
--- a/md5.c
+++ b/libopkg/md5.c
diff --git a/md5.h b/libopkg/md5.h
index 7af7e93..7af7e93 100644
--- a/md5.h
+++ b/libopkg/md5.h
diff --git a/nv_pair.c b/libopkg/nv_pair.c
index 75a08e8..75a08e8 100644
--- a/nv_pair.c
+++ b/libopkg/nv_pair.c
diff --git a/nv_pair.h b/libopkg/nv_pair.h
index 664eab8..664eab8 100644
--- a/nv_pair.h
+++ b/libopkg/nv_pair.h
diff --git a/nv_pair_list.c b/libopkg/nv_pair_list.c
index b925322..b925322 100644
--- a/nv_pair_list.c
+++ b/libopkg/nv_pair_list.c
diff --git a/nv_pair_list.h b/libopkg/nv_pair_list.h
index 8638dd1..8638dd1 100644
--- a/nv_pair_list.h
+++ b/libopkg/nv_pair_list.h
diff --git a/opkg.c b/libopkg/opkg.c
index e113847..e113847 100644
--- a/opkg.c
+++ b/libopkg/opkg.c
diff --git a/opkg.h b/libopkg/opkg.h
index b6a793d..b6a793d 100644
--- a/opkg.h
+++ b/libopkg/opkg.h
diff --git a/opkg_cmd.c b/libopkg/opkg_cmd.c
index db04a4a..db04a4a 100644
--- a/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
diff --git a/opkg_cmd.h b/libopkg/opkg_cmd.h
index 157e929..157e929 100644
--- a/opkg_cmd.h
+++ b/libopkg/opkg_cmd.h
diff --git a/opkg_conf.c b/libopkg/opkg_conf.c
index abeab19..abeab19 100644
--- a/opkg_conf.c
+++ b/libopkg/opkg_conf.c
diff --git a/opkg_conf.h b/libopkg/opkg_conf.h
index 4b50900..4b50900 100644
--- a/opkg_conf.h
+++ b/libopkg/opkg_conf.h
diff --git a/opkg_configure.c b/libopkg/opkg_configure.c
index 8309e40..8309e40 100644
--- a/opkg_configure.c
+++ b/libopkg/opkg_configure.c
diff --git a/opkg_configure.h b/libopkg/opkg_configure.h
index f56f0e4..f56f0e4 100644
--- a/opkg_configure.h
+++ b/libopkg/opkg_configure.h
diff --git a/opkg_download.c b/libopkg/opkg_download.c
index bbd6efe..bbd6efe 100644
--- a/opkg_download.c
+++ b/libopkg/opkg_download.c
diff --git a/opkg_download.h b/libopkg/opkg_download.h
index d3f419d..d3f419d 100644
--- a/opkg_download.h
+++ b/libopkg/opkg_download.h
diff --git a/opkg_extract_test.c b/libopkg/opkg_extract_test.c
index 83e23e3..83e23e3 100644
--- a/opkg_extract_test.c
+++ b/libopkg/opkg_extract_test.c
diff --git a/opkg_hash_test.c b/libopkg/opkg_hash_test.c
index 934dac7..934dac7 100644
--- a/opkg_hash_test.c
+++ b/libopkg/opkg_hash_test.c
diff --git a/opkg_install.c b/libopkg/opkg_install.c
index 599ae4d..599ae4d 100644
--- a/opkg_install.c
+++ b/libopkg/opkg_install.c
diff --git a/opkg_install.h b/libopkg/opkg_install.h
index 8d064ac..8d064ac 100644
--- a/opkg_install.h
+++ b/libopkg/opkg_install.h
diff --git a/opkg_message.c b/libopkg/opkg_message.c
index 38f16df..38f16df 100644
--- a/opkg_message.c
+++ b/libopkg/opkg_message.c
diff --git a/opkg_message.h b/libopkg/opkg_message.h
index 86f895b..86f895b 100644
--- a/opkg_message.h
+++ b/libopkg/opkg_message.h
diff --git a/opkg_remove.c b/libopkg/opkg_remove.c
index eb7825a..eb7825a 100644
--- a/opkg_remove.c
+++ b/libopkg/opkg_remove.c
diff --git a/opkg_remove.h b/libopkg/opkg_remove.h
index bc96f32..bc96f32 100644
--- a/opkg_remove.h
+++ b/libopkg/opkg_remove.h
diff --git a/opkg_state.c b/libopkg/opkg_state.c
index 2cc8594..2cc8594 100644
--- a/opkg_state.c
+++ b/libopkg/opkg_state.c
diff --git a/opkg_state.h b/libopkg/opkg_state.h
index 2718569..2718569 100644
--- a/opkg_state.h
+++ b/libopkg/opkg_state.h
diff --git a/opkg_upgrade.c b/libopkg/opkg_upgrade.c
index b0b047f..b0b047f 100644
--- a/opkg_upgrade.c
+++ b/libopkg/opkg_upgrade.c
diff --git a/opkg_upgrade.h b/libopkg/opkg_upgrade.h
index 5022df4..5022df4 100644
--- a/opkg_upgrade.h
+++ b/libopkg/opkg_upgrade.h
diff --git a/opkg_utils.c b/libopkg/opkg_utils.c
index 0b59645..0b59645 100644
--- a/opkg_utils.c
+++ b/libopkg/opkg_utils.c
diff --git a/opkg_utils.h b/libopkg/opkg_utils.h
index f47e35f..f47e35f 100644
--- a/opkg_utils.h
+++ b/libopkg/opkg_utils.h
diff --git a/pkg.c b/libopkg/pkg.c
index fe9118f..fe9118f 100644
--- a/pkg.c
+++ b/libopkg/pkg.c
diff --git a/pkg.h b/libopkg/pkg.h
index ffb969b..ffb969b 100644
--- a/pkg.h
+++ b/libopkg/pkg.h
diff --git a/pkg_depends.c b/libopkg/pkg_depends.c
index 7ebd04e..7ebd04e 100644
--- a/pkg_depends.c
+++ b/libopkg/pkg_depends.c
diff --git a/pkg_depends.h b/libopkg/pkg_depends.h
index b0066ce..b0066ce 100644
--- a/pkg_depends.h
+++ b/libopkg/pkg_depends.h
diff --git a/pkg_dest.c b/libopkg/pkg_dest.c
index f015dd6..f015dd6 100644
--- a/pkg_dest.c
+++ b/libopkg/pkg_dest.c
diff --git a/pkg_dest.h b/libopkg/pkg_dest.h
index 33c72da..33c72da 100644
--- a/pkg_dest.h
+++ b/libopkg/pkg_dest.h
diff --git a/pkg_dest_list.c b/libopkg/pkg_dest_list.c
index 023e58e..023e58e 100644
--- a/pkg_dest_list.c
+++ b/libopkg/pkg_dest_list.c
diff --git a/pkg_dest_list.h b/libopkg/pkg_dest_list.h
index a3c1c65..a3c1c65 100644
--- a/pkg_dest_list.h
+++ b/libopkg/pkg_dest_list.h
diff --git a/pkg_extract.c b/libopkg/pkg_extract.c
index 78c252b..78c252b 100644
--- a/pkg_extract.c
+++ b/libopkg/pkg_extract.c
diff --git a/pkg_extract.h b/libopkg/pkg_extract.h
index 4c491e8..4c491e8 100644
--- a/pkg_extract.h
+++ b/libopkg/pkg_extract.h
diff --git a/pkg_hash.c b/libopkg/pkg_hash.c
index 0106e65..0106e65 100644
--- a/pkg_hash.c
+++ b/libopkg/pkg_hash.c
diff --git a/pkg_hash.h b/libopkg/pkg_hash.h
index 7303418..7303418 100644
--- a/pkg_hash.h
+++ b/libopkg/pkg_hash.h
diff --git a/pkg_parse.c b/libopkg/pkg_parse.c
index 0bb4433..0bb4433 100644
--- a/pkg_parse.c
+++ b/libopkg/pkg_parse.c
diff --git a/pkg_parse.h b/libopkg/pkg_parse.h
index e6f02fd..e6f02fd 100644
--- a/pkg_parse.h
+++ b/libopkg/pkg_parse.h
diff --git a/pkg_src.c b/libopkg/pkg_src.c
index 0566b7f..0566b7f 100644
--- a/pkg_src.c
+++ b/libopkg/pkg_src.c
diff --git a/pkg_src.h b/libopkg/pkg_src.h
index 82060a7..82060a7 100644
--- a/pkg_src.h
+++ b/libopkg/pkg_src.h
diff --git a/pkg_src_list.c b/libopkg/pkg_src_list.c
index c1e63b4..c1e63b4 100644
--- a/pkg_src_list.c
+++ b/libopkg/pkg_src_list.c
diff --git a/pkg_src_list.h b/libopkg/pkg_src_list.h
index 074ff48..074ff48 100644
--- a/pkg_src_list.h
+++ b/libopkg/pkg_src_list.h
diff --git a/pkg_vec.c b/libopkg/pkg_vec.c
index 2d22d91..2d22d91 100644
--- a/pkg_vec.c
+++ b/libopkg/pkg_vec.c
diff --git a/pkg_vec.h b/libopkg/pkg_vec.h
index 2bc1631..2bc1631 100644
--- a/pkg_vec.h
+++ b/libopkg/pkg_vec.h
diff --git a/sprintf_alloc.c b/libopkg/sprintf_alloc.c
index 1d53b20..1d53b20 100644
--- a/sprintf_alloc.c
+++ b/libopkg/sprintf_alloc.c
diff --git a/sprintf_alloc.h b/libopkg/sprintf_alloc.h
index 3d68d69..3d68d69 100644
--- a/sprintf_alloc.h
+++ b/libopkg/sprintf_alloc.h
diff --git a/str_list.c b/libopkg/str_list.c
index e79bf8d..e79bf8d 100644
--- a/str_list.c
+++ b/libopkg/str_list.c
diff --git a/str_list.h b/libopkg/str_list.h
index 858ccd9..858ccd9 100644
--- a/str_list.h
+++ b/libopkg/str_list.h
diff --git a/str_util.c b/libopkg/str_util.c
index e1f5e68..e1f5e68 100644
--- a/str_util.c
+++ b/libopkg/str_util.c
diff --git a/str_util.h b/libopkg/str_util.h
index c1acab0..c1acab0 100644
--- a/str_util.h
+++ b/libopkg/str_util.h
diff --git a/user.c b/libopkg/user.c
index 98ab7b9..98ab7b9 100644
--- a/user.c
+++ b/libopkg/user.c
diff --git a/user.h b/libopkg/user.h
index fa0f818..fa0f818 100644
--- a/user.h
+++ b/libopkg/user.h
diff --git a/void_list.c b/libopkg/void_list.c
index af8e6a3..af8e6a3 100644
--- a/void_list.c
+++ b/libopkg/void_list.c
diff --git a/void_list.h b/libopkg/void_list.h
index 7642905..7642905 100644
--- a/void_list.h
+++ b/libopkg/void_list.h
diff --git a/xregex.c b/libopkg/xregex.c
index 7e50050..7e50050 100644
--- a/xregex.c
+++ b/libopkg/xregex.c
diff --git a/xregex.h b/libopkg/xregex.h
index f67572b..f67572b 100644
--- a/xregex.h
+++ b/libopkg/xregex.h
diff --git a/xsystem.c b/libopkg/xsystem.c
index 06d6ae4..06d6ae4 100644
--- a/xsystem.c
+++ b/libopkg/xsystem.c
diff --git a/xsystem.h b/libopkg/xsystem.h
index cc1ca2a..cc1ca2a 100644
--- a/xsystem.h
+++ b/libopkg/xsystem.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..dbb3869
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,10 @@
+
+bin_PROGRAMS = opkg-cl
+
+#lib_LTLIBRARIES = libopkg.la
+opkg_cl_SOURCES = opkg-frontend.c
+opkg_cl_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS)
+opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.la \
+ $(top_builddir)/libbb/libbb.la
+
+
diff --git a/opkg-frontend.c b/src/opkg-frontend.c
index 47671d2..47671d2 100644
--- a/opkg-frontend.c
+++ b/src/opkg-frontend.c