Browse Source

create ebuild and move header to subdir to prevent filename collisions

master
Georg Hopp 14 years ago
parent
commit
925bdb7d98
  1. 2
      createToken.c
  2. 9
      gentoo/ChangeLog
  3. 12
      gentoo/metadata.xml
  4. 20
      gentoo/token-9999.ebuild
  5. 2
      include/Makefile.am
  6. 82
      include/Makefile.in
  7. 11
      include/token.h
  8. 0
      include/token/cclass.h
  9. 2
      include/token/crypt.h
  10. 4
      include/token/dyntype.h
  11. 4
      include/token/dyntype/hash.h
  12. 4
      include/token/packet.h
  13. 11
      include/token/token.h
  14. 2
      src/cclass.c
  15. 4
      src/crypt.c
  16. 4
      src/dyntype.c
  17. 6
      src/dyntype/hash.c
  18. 2
      src/packet.c
  19. 4
      tests/crypt.c
  20. 4
      tests/decrypt.c
  21. 4
      tests/dyntype.c
  22. 4
      tests/hash.c
  23. 8
      tests/packet.c

2
createToken.c

@ -5,7 +5,7 @@
#include <time.h>
#include <json/json.h>
#include "token.h"
#include "token/token.h"
#include "base64.h"

9
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 <georg@steffers.org> initial ebuild created
# vim: set et ts=2 sw=2:

12
gentoo/metadata.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>georg@steffer.org</email>
<description>Author of the package</description>
</maintainer>
<longdescription>
This is a C library to create encrypted tokens by using libmcrypt.
These tokens may contain some json encoded payload data.
</longdescription>
</pkgmetadata>

20
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}"

2
include/Makefile.am

@ -1 +1 @@
nobase_include_HEADERS = cclass.h crypt.h dyntype.h dyntype/hash.h packet.h
nobase_include_HEADERS = token

82
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.

11
include/token.h

@ -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:

0
include/cclass.h → include/token/cclass.h

2
include/crypt.h → include/token/crypt.h

@ -3,7 +3,7 @@
#include <sys/types.h>
#include "cclass.h"
#include "token/cclass.h"
struct CRYPT {

4
include/dyntype.h → include/token/dyntype.h

@ -3,11 +3,11 @@
#include <sys/types.h>
#include "cclass.h"
#include "token/cclass.h"
struct DYNTYPE;
#include "dyntype/hash.h"
#include "token/dyntype/hash.h"
enum DYNTYPE_TYPES {

4
include/dyntype/hash.h → include/token/dyntype/hash.h

@ -3,8 +3,8 @@
#include <sys/types.h>
#include "cclass.h"
#include "dyntype.h"
#include "token/cclass.h"
#include "token/dyntype.h"
struct DYNTYPE_HASH {

4
include/packet.h → 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 {

11
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:

2
src/cclass.c

@ -3,7 +3,7 @@
#include <stdlib.h>
#include <json/json.h>
#include "cclass.h"
#include "token/cclass.h"
void *

4
src/crypt.c

@ -7,8 +7,8 @@
#include <mcrypt.h>
#include <mhash.h>
#include "cclass.h"
#include "crypt.h"
#include "token/cclass.h"
#include "token/crypt.h"
static

4
src/dyntype.c

@ -3,8 +3,8 @@
#include <sys/types.h>
#include <json/json.h>
#include "dyntype.h"
#include "dyntype/hash.h"
#include "token/dyntype.h"
#include "token/dyntype/hash.h"
static

6
src/dyntype/hash.c

@ -2,9 +2,9 @@
#include <stdlib.h>
#include <json/json.h>
#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

2
src/packet.c

@ -1,6 +1,6 @@
#include <json/json.h>
#include "packet.h"
#include "token/packet.h"
static

4
tests/crypt.c

@ -4,8 +4,8 @@
#include <stdio.h>
#include <sys/types.h>
#include "cclass.h"
#include "crypt.h"
#include "token/cclass.h"
#include "token/crypt.h"
#include "base64.h"

4
tests/decrypt.c

@ -4,8 +4,8 @@
#include <stdio.h>
#include <sys/types.h>
#include "cclass.h"
#include "crypt.h"
#include "token/cclass.h"
#include "token/crypt.h"
#include "base64.h"

4
tests/dyntype.c

@ -2,8 +2,8 @@
#include <string.h>
#include <json/json.h>
#include "cclass.h"
#include "dyntype.h"
#include "token/cclass.h"
#include "token/dyntype.h"
#define TEST_STR "this is a foo string"

4
tests/hash.c

@ -2,8 +2,8 @@
#include <string.h>
#include <json/json.h>
#include "cclass.h"
#include "dyntype/hash.h"
#include "token/cclass.h"
#include "token/dyntype/hash.h"
#define TEST_KEY1 "key1"

8
tests/packet.c

@ -4,10 +4,10 @@
#include <time.h>
#include <json/json.h>
#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

Loading…
Cancel
Save