From 925bdb7d9845b2f5e150435e10abe1f3b77c3cd2 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 15 Nov 2011 12:52:09 +0100 Subject: [PATCH] create ebuild and move header to subdir to prevent filename collisions --- createToken.c | 2 +- gentoo/ChangeLog | 9 ++++ gentoo/metadata.xml | 12 +++++ gentoo/token-9999.ebuild | 20 ++++++++ include/Makefile.am | 2 +- include/Makefile.in | 82 +++++++----------------------- include/token.h | 11 ---- include/{ => token}/cclass.h | 0 include/{ => token}/crypt.h | 2 +- include/{ => token}/dyntype.h | 4 +- include/{ => token}/dyntype/hash.h | 4 +- include/{ => token}/packet.h | 4 +- include/token/token.h | 11 ++++ src/cclass.c | 2 +- src/crypt.c | 4 +- src/dyntype.c | 4 +- src/dyntype/hash.c | 6 +-- src/packet.c | 2 +- tests/crypt.c | 4 +- tests/decrypt.c | 4 +- tests/dyntype.c | 4 +- tests/hash.c | 4 +- tests/packet.c | 8 +-- 23 files changed, 99 insertions(+), 106 deletions(-) create mode 100644 gentoo/ChangeLog create mode 100644 gentoo/metadata.xml create mode 100644 gentoo/token-9999.ebuild delete mode 100644 include/token.h rename include/{ => token}/cclass.h (100%) rename include/{ => token}/crypt.h (97%) rename include/{ => token}/dyntype.h (92%) rename include/{ => token}/dyntype/hash.h (92%) rename include/{ => token}/packet.h (92%) create mode 100644 include/token/token.h diff --git a/createToken.c b/createToken.c index 2833981..80d49e8 100644 --- a/createToken.c +++ b/createToken.c @@ -5,7 +5,7 @@ #include #include -#include "token.h" +#include "token/token.h" #include "base64.h" diff --git a/gentoo/ChangeLog b/gentoo/ChangeLog new file mode 100644 index 0000000..d07d33b --- /dev/null +++ b/gentoo/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-libs/token +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*token-9999 (15 NOV 2011) + + 15 NOV 2011; Georg Hopp initial ebuild created + +# vim: set et ts=2 sw=2: diff --git a/gentoo/metadata.xml b/gentoo/metadata.xml new file mode 100644 index 0000000..e24e03d --- /dev/null +++ b/gentoo/metadata.xml @@ -0,0 +1,12 @@ + + + + + georg@steffer.org + Author of the package + + + This is a C library to create encrypted tokens by using libmcrypt. + These tokens may contain some json encoded payload data. + + diff --git a/gentoo/token-9999.ebuild b/gentoo/token-9999.ebuild new file mode 100644 index 0000000..4f14c01 --- /dev/null +++ b/gentoo/token-9999.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit eutils git + +DESCRIPTION="a library to create encrypted tokens with json payload" +HOMEPAGE="http://redmine.weird-web-workers.org/projects/ctoken/" + +SRC_URI="" +EGIT_REPO_URI="git://redminie.weird-web-workers.org/var/lib/git/token" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" + +DEPENDS=">=dev-libs/json-c-0.9 + dev-libs/libmcrypt-2.5.8-r2" +RDEPEND="${DEPEND}" diff --git a/include/Makefile.am b/include/Makefile.am index f035915..6282953 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1 @@ -nobase_include_HEADERS = cclass.h crypt.h dyntype.h dyntype/hash.h packet.h +nobase_include_HEADERS = token diff --git a/include/Makefile.in b/include/Makefile.in index e26f75c..1c6bf37 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -70,8 +70,6 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) -ETAGS = etags -CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -186,7 +184,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -nobase_include_HEADERS = cclass.h crypt.h dyntype.h dyntype/hash.h packet.h +nobase_include_HEADERS = token all: all-am .SUFFIXES: @@ -249,58 +247,12 @@ uninstall-nobase_includeHEADERS: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique tags: TAGS +TAGS: -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +CTAGS: + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -370,7 +322,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -432,18 +384,18 @@ uninstall-am: uninstall-nobase_includeHEADERS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-nobase_includeHEADERS +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nobase_includeHEADERS install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/include/token.h b/include/token.h deleted file mode 100644 index 3ad4e30..0000000 --- a/include/token.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __TOKEN_H__ -#define __TOKEN_H__ - -#include "cclass.h" -#include "crypt.h" -#include "dyntype.h" -#include "dyntype/hash.h" -#include "packet.h" - -#endif//__TOKEN_H__ -// vim: set et ts=4 sw=4: diff --git a/include/cclass.h b/include/token/cclass.h similarity index 100% rename from include/cclass.h rename to include/token/cclass.h diff --git a/include/crypt.h b/include/token/crypt.h similarity index 97% rename from include/crypt.h rename to include/token/crypt.h index b0cf70d..b3f38d8 100644 --- a/include/crypt.h +++ b/include/token/crypt.h @@ -3,7 +3,7 @@ #include -#include "cclass.h" +#include "token/cclass.h" struct CRYPT { diff --git a/include/dyntype.h b/include/token/dyntype.h similarity index 92% rename from include/dyntype.h rename to include/token/dyntype.h index 00f4086..69d551e 100644 --- a/include/dyntype.h +++ b/include/token/dyntype.h @@ -3,11 +3,11 @@ #include -#include "cclass.h" +#include "token/cclass.h" struct DYNTYPE; -#include "dyntype/hash.h" +#include "token/dyntype/hash.h" enum DYNTYPE_TYPES { diff --git a/include/dyntype/hash.h b/include/token/dyntype/hash.h similarity index 92% rename from include/dyntype/hash.h rename to include/token/dyntype/hash.h index 2954eaf..0c2274f 100644 --- a/include/dyntype/hash.h +++ b/include/token/dyntype/hash.h @@ -3,8 +3,8 @@ #include -#include "cclass.h" -#include "dyntype.h" +#include "token/cclass.h" +#include "token/dyntype.h" struct DYNTYPE_HASH { diff --git a/include/packet.h b/include/token/packet.h similarity index 92% rename from include/packet.h rename to include/token/packet.h index 38bfe8f..dd68821 100644 --- a/include/packet.h +++ b/include/token/packet.h @@ -1,8 +1,8 @@ #ifndef __PACKET_H__ #define __PACKET_H__ -#include "cclass.h" -#include "dyntype.h" +#include "token/cclass.h" +#include "token/dyntype.h" enum PACKET_CONTENT_KEYS { diff --git a/include/token/token.h b/include/token/token.h new file mode 100644 index 0000000..224b967 --- /dev/null +++ b/include/token/token.h @@ -0,0 +1,11 @@ +#ifndef __TOKEN_H__ +#define __TOKEN_H__ + +#include "token/cclass.h" +#include "token/crypt.h" +#include "token/dyntype.h" +#include "token/dyntype/hash.h" +#include "token/packet.h" + +#endif//__TOKEN_H__ +// vim: set et ts=4 sw=4: diff --git a/src/cclass.c b/src/cclass.c index aa8259f..1c9bec8 100644 --- a/src/cclass.c +++ b/src/cclass.c @@ -3,7 +3,7 @@ #include #include -#include "cclass.h" +#include "token/cclass.h" void * diff --git a/src/crypt.c b/src/crypt.c index 69bca75..302be82 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -7,8 +7,8 @@ #include #include -#include "cclass.h" -#include "crypt.h" +#include "token/cclass.h" +#include "token/crypt.h" static diff --git a/src/dyntype.c b/src/dyntype.c index b06c327..a7a6c39 100644 --- a/src/dyntype.c +++ b/src/dyntype.c @@ -3,8 +3,8 @@ #include #include -#include "dyntype.h" -#include "dyntype/hash.h" +#include "token/dyntype.h" +#include "token/dyntype/hash.h" static diff --git a/src/dyntype/hash.c b/src/dyntype/hash.c index be2f6f0..5e6be64 100644 --- a/src/dyntype/hash.c +++ b/src/dyntype/hash.c @@ -2,9 +2,9 @@ #include #include -#include "cclass.h" -#include "dyntype.h" -#include "dyntype/hash.h" +#include "token/cclass.h" +#include "token/dyntype.h" +#include "token/dyntype/hash.h" #define HASH_ENTRY_CHUNK_SIZE 128 diff --git a/src/packet.c b/src/packet.c index 19159a7..5198719 100644 --- a/src/packet.c +++ b/src/packet.c @@ -1,6 +1,6 @@ #include -#include "packet.h" +#include "token/packet.h" static diff --git a/tests/crypt.c b/tests/crypt.c index 2c1b329..bfb80b1 100644 --- a/tests/crypt.c +++ b/tests/crypt.c @@ -4,8 +4,8 @@ #include #include -#include "cclass.h" -#include "crypt.h" +#include "token/cclass.h" +#include "token/crypt.h" #include "base64.h" diff --git a/tests/decrypt.c b/tests/decrypt.c index fa7a1d8..fa26d43 100644 --- a/tests/decrypt.c +++ b/tests/decrypt.c @@ -4,8 +4,8 @@ #include #include -#include "cclass.h" -#include "crypt.h" +#include "token/cclass.h" +#include "token/crypt.h" #include "base64.h" diff --git a/tests/dyntype.c b/tests/dyntype.c index ee2e129..7fd16e2 100644 --- a/tests/dyntype.c +++ b/tests/dyntype.c @@ -2,8 +2,8 @@ #include #include -#include "cclass.h" -#include "dyntype.h" +#include "token/cclass.h" +#include "token/dyntype.h" #define TEST_STR "this is a foo string" diff --git a/tests/hash.c b/tests/hash.c index 0908a68..1f43fba 100644 --- a/tests/hash.c +++ b/tests/hash.c @@ -2,8 +2,8 @@ #include #include -#include "cclass.h" -#include "dyntype/hash.h" +#include "token/cclass.h" +#include "token/dyntype/hash.h" #define TEST_KEY1 "key1" diff --git a/tests/packet.c b/tests/packet.c index d08e586..d6c50ba 100644 --- a/tests/packet.c +++ b/tests/packet.c @@ -4,10 +4,10 @@ #include #include -#include "cclass.h" -#include "packet.h" -#include "dyntype.h" -#include "dyntype/hash.h" +#include "token/cclass.h" +#include "token/packet.h" +#include "token/dyntype.h" +#include "token/dyntype/hash.h" void