Skip to content

Commit

Permalink
Add initial project files
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed Mar 28, 2014
1 parent cce79db commit 591ade9
Show file tree
Hide file tree
Showing 29 changed files with 1,839 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
@@ -0,0 +1 @@
Richard Hughes <richard@hughsie.com>
502 changes: 502 additions & 0 deletions COPYING

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions Makefile.am
@@ -0,0 +1,60 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = \
libhif \
data \
docs

DISTCLEANFILES = \
libhif-*.tar.xz

MAINTAINERCLEANFILES = \
*~ \
aclocal.m4 \
ChangeLog \
compile \
config.guess \
config.h.* \
config.sub \
configure \
depcomp \
gtk-doc.make \
INSTALL \
install-sh \
ltmain.sh \
Makefile.in \
missing \
mkinstalldirs \
test-driver

EXTRA_DIST = \
COPYING \
MAINTAINERS \
AUTHORS \
README.md \
NEWS \
autogen.sh \
config.h

distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
fi

ChangeLog:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log HIF_0_0_X.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi

.PHONY: ChangeLog

-include $(top_srcdir)/git.mk
1 change: 1 addition & 0 deletions NEWS
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions README.md
@@ -0,0 +1,10 @@
libihf
======

This library provides a high level package-manager. It uses librepo and hawkey
under the hood.

License
----

LGPLv2+
40 changes: 40 additions & 0 deletions RELEASE
@@ -0,0 +1,40 @@
Release Notes

1. Write NEWS entries for libhif in the same format as usual.

git shortlog libhif_0_1_0.. | grep -i -v trivial | grep -v Merge > NEWS.new

--------------------------------------------------------------------------------
Version 0.1.0
~~~~~~~~~~~~~
Released: 2014-xx-xx

Notes:

New Features:

Bugfixes:
--------------------------------------------------------------------------------

3. Update library version if new ABI or API in configure.ac

4. Commit changes in git:

git commit -a -m "Release version 0.1.0"
git tag -s -f -m "Release 0.1.0" libhif_0_1_0
<gpg password>
git push --tags
git push

5. run 'make distcheck'

6. Upload tarball to:

scp *.tar.* hughsient@people.freedesktop.org:~/public_html/libhif/releases

7. Do post release version bump in configure.ac

8. Commit trivial changes:

git commit -a -m "trivial: post release version bump"
git push
39 changes: 39 additions & 0 deletions autogen.sh
@@ -0,0 +1,39 @@
#!/bin/sh
# Copyright (C) 2009-2014 Richard Hughes <richard@hughsie.com>
#
# Run this to generate all the initial makefiles, etc.
#
# Licensed under the GNU General Public License Version 2
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory \"\'$srcdir\'\" does not look like the"
echo " top-level package directory"
exit 1
}

if ([ -z "$*" ] && [ "x$NOCONFIGURE" = "x" ]) ; then
echo "**Warning**: I am going to run 'configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo "'$0' command line."
echo
fi

(cd $srcdir && gtkdocize) || exit 1
(cd $srcdir && autoreconf --force --install) || exit 1

conf_flags="--enable-gtk-doc"

if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi
104 changes: 104 additions & 0 deletions configure.ac
@@ -0,0 +1,104 @@
AC_PREREQ(2.63)

m4_define([hif_major_version], [0])
m4_define([hif_minor_version], [1])
m4_define([hif_micro_version], [0])
m4_define([hif_version],
[hif_major_version.hif_minor_version.hif_micro_version])

AC_INIT([libhif],[hif_version])
AC_CONFIG_SRCDIR(libhif)
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_SYS_LARGEFILE

GOBJECT_INTROSPECTION_CHECK([0.9.8])

HIF_MAJOR_VERSION=hif_major_version
HIF_MINOR_VERSION=hif_minor_version
HIF_MICRO_VERSION=hif_micro_version
HIF_VERSION=hif_version
AC_SUBST(HIF_MAJOR_VERSION)
AC_SUBST(HIF_MINOR_VERSION)
AC_SUBST(HIF_MICRO_VERSION)
AC_SUBST(HIF_VERSION)

# enable nice build output on automake1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

# libtool versioning - this applies to libpackagekit
#
# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
#
# - If interfaces have been changed or added, but binary compatibility
# has been preserved, change:
# CURRENT += 1
# REVISION = 0
# AGE += 1
# - If binary compatibility has been broken (eg removed or changed
# interfaces), change:
# CURRENT += 1
# REVISION = 0
# AGE = 0
# - If the interface is the same as the previous version, but bugs are
# fixed, change:
# REVISION += 1
LT_CURRENT=1
LT_REVISION=0
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_HEADER_STDC
LT_INIT
AM_PROG_CC_C_O

# set up gtk-doc
GTK_DOC_CHECK(1.9)

if test "$GCC" = "yes"; then
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wall"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align -Wno-uninitialized"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-declarations"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wredundant-decls"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wpointer-arith"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wwrite-strings"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Winit-self"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wreturn-type"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-nonliteral"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-security"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-include-dirs"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-format-attribute"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wsign-compare"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wtype-limits"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wuninitialized"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Waggregate-return"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wdeclaration-after-statement"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wshadow"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wno-strict-aliasing"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Winline"
else
WARNINGFLAGS_C=""
fi
AC_SUBST(WARNINGFLAGS_C)

PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.1 gio-2.0 gobject-2.0 gthread-2.0)

AC_CONFIG_FILES([
Makefile
libhif/Makefile
libhif/libhif.pc
libhif/hif-version.h
data/Makefile
data/tests/Makefile
docs/Makefile
docs/api/Makefile
docs/api/version.xml
])
AC_OUTPUT
66 changes: 66 additions & 0 deletions contrib/libhif.spec.in
@@ -0,0 +1,66 @@
%define alphatag #ALPHATAG#

Summary: Simple package manager built on top of hawkey and librepo
Name: libhif
Version: #VERSION#
Release: 0.#BUILD#%{?alphatag}%{?dist}
License: LGPLv2+
URL: http://people.freedesktop.org/~hughsient/libhif/
Source0: http://people.freedesktop.org/~hughsient/libhif/releases/libhif-%{version}.tar.xz

BuildRequires: glib2-devel >= 2.16.1
BuildRequires: libtool
BuildRequires: docbook-utils
BuildRequires: gtk-doc
BuildRequires: gobject-introspection-devel
BuildRequires: gperf

%description
This library provides a simple interface to hawkey and librepo and is currently
used by PackageKit and rpm-ostree.

%package devel
Summary: GLib Libraries and headers for libhif
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
GLib headers and libraries for libhif.

%prep
%setup -q -n libhif-%{version}

%build
%configure \
--enable-gtk-doc \
--disable-static \
--disable-silent-rules \
--disable-dependency-tracking

make %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/libhif*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc README.md AUTHORS NEWS COPYING
%{_libdir}/libhif.so.1*
%{_libdir}/girepository-1.0/*.typelib

%files devel
%{_libdir}/libhif.so
%{_libdir}/pkgconfig/libhif.pc
%dir %{_includedir}/libhif
%{_includedir}/libhif/*.h
%{_datadir}/gtk-doc
%{_datadir}/gir-1.0/*.gir

%changelog
* #LONGDATE# Richard Hughes <richard@hughsie.com> #VERSION#-0.#BUILD##ALPHATAG#
- Update from git

4 changes: 4 additions & 0 deletions data/Makefile.am
@@ -0,0 +1,4 @@
SUBDIRS = \
tests

-include $(top_srcdir)/git.mk
5 changes: 5 additions & 0 deletions data/tests/Makefile.am
@@ -0,0 +1,5 @@
test_files =

EXTRA_DIST = $(test_files)

-include $(top_srcdir)/git.mk
5 changes: 5 additions & 0 deletions docs/Makefile.am
@@ -0,0 +1,5 @@
SUBDIRS = \
api


-include $(top_srcdir)/git.mk

0 comments on commit 591ade9

Please sign in to comment.