mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-24 21:40:43 +01:00
Move utility source code to libuitil.a
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
618aaf4278
commit
16f3e4d97c
17 changed files with 30 additions and 21 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,5 +15,6 @@ missing
|
|||
stamp-h1
|
||||
config.h
|
||||
*.o
|
||||
*.a
|
||||
*~
|
||||
pkg
|
||||
|
|
20
Makefile.am
20
Makefile.am
|
@ -3,20 +3,24 @@ ACLOCAL_AMFLAGS = -I m4
|
|||
AM_CPPFLAGS = -I$(top_srcdir)/include -D_GNU_SOURCE
|
||||
AM_CFLAGS = $(WARN_CFLAGS)
|
||||
|
||||
# application core
|
||||
GLOBALHDR = include/pkgformat.h include/util.h include/pkgreader.h
|
||||
GLOBALHDR += include/compressor.h include/command.h include/pkgwriter.h
|
||||
GLOBALHDR += include/image_entry.h include/pkgio.h include/input_file.h
|
||||
# helper libraries
|
||||
libutil_a_SOURCES = lib/util/input_file.c lib/util/mkdir_p.c lib/util/util.c
|
||||
libutil_a_SOURCES += include/util/util.h include/util/input_file.h
|
||||
|
||||
MAIN = main/pkg.c main/util.c main/compressor.c main/command.c main/pkgreader.c
|
||||
# application core
|
||||
GLOBALHDR = include/pkgformat.h include/pkgreader.h
|
||||
GLOBALHDR += include/compressor.h include/command.h include/pkgwriter.h
|
||||
GLOBALHDR += include/image_entry.h include/pkgio.h
|
||||
|
||||
MAIN = main/pkg.c main/compressor.c main/command.c main/pkgreader.c
|
||||
MAIN += main/pkgwriter.c main/image_entry.c main/image_entry_sort.c
|
||||
MAIN += main/mkdir_p.c main/pkgio_rd_image_entry.c main/pkg_unpack.c
|
||||
MAIN += main/input_file.c main/dump_toc.c
|
||||
MAIN += main/pkgio_rd_image_entry.c main/pkg_unpack.c main/dump_toc.c
|
||||
|
||||
pkg_SOURCES = $(GLOBALHDR) $(MAIN)
|
||||
pkg_CFLAGS = $(AM_CFLAGS)
|
||||
pkg_LDADD =
|
||||
pkg_LDADD = libutil.a
|
||||
|
||||
noinst_LIBRARIES = libutil.a
|
||||
bin_PROGRAMS = pkg
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
|
|
|
@ -5,6 +5,7 @@ AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
|
|||
AM_SILENT_RULES([yes])
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
|
||||
m4_ifndef([PKG_PROG_PKG_CONFIG],
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "input_file.h"
|
||||
#include "util/input_file.h"
|
||||
|
||||
static int prefetch_line(input_file_t *f)
|
||||
{
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
|
||||
int mkdir_p(const char *path)
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
|
||||
int canonicalize_name(char *filename)
|
||||
{
|
|
@ -7,12 +7,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "util/util.h"
|
||||
|
||||
#include "image_entry.h"
|
||||
#include "pkgformat.h"
|
||||
#include "pkgreader.h"
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
#include "util.h"
|
||||
|
||||
typedef enum {
|
||||
DUMP_TOC = 0x01,
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "util/util.h"
|
||||
|
||||
#include "image_entry.h"
|
||||
#include "pkgreader.h"
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
#include "util.h"
|
||||
|
||||
enum {
|
||||
INSTALL_MODE_INSTALL = 0,
|
||||
|
|
|
@ -14,13 +14,14 @@
|
|||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "util/input_file.h"
|
||||
#include "util/util.h"
|
||||
|
||||
#include "image_entry.h"
|
||||
#include "input_file.h"
|
||||
#include "compressor.h"
|
||||
#include "pkgformat.h"
|
||||
#include "pkgwriter.h"
|
||||
#include "command.h"
|
||||
#include "util.h"
|
||||
|
||||
typedef struct dependency_t {
|
||||
struct dependency_t *next;
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "util/util.h"
|
||||
|
||||
#include "pkgreader.h"
|
||||
#include "command.h"
|
||||
#include "pkgio.h"
|
||||
#include "util.h"
|
||||
|
||||
static const struct option long_opts[] = {
|
||||
{ "root", required_argument, NULL, 'r' },
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "image_entry.h"
|
||||
#include "util.h"
|
||||
|
||||
void image_entry_free(image_entry_t *ent)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
#include "pkgio.h"
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
|
||||
static int create_hierarchy(int dirfd, image_entry_t *list)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "pkgio.h"
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
|
||||
static int read_extra(pkg_reader_t *pkg, image_entry_t *ent)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
#include "pkgreader.h"
|
||||
#include "compressor.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include "pkgwriter.h"
|
||||
#include "util.h"
|
||||
#include "util/util.h"
|
||||
|
||||
struct pkg_writer_t {
|
||||
const char *path;
|
||||
|
|
Loading…
Reference in a new issue