Commit 925bdb7d9845b2f5e150435e10abe1f3b77c3cd2

Authored by Georg Hopp
1 parent 9ce2dd0b

create ebuild and move header to subdir to prevent filename collisions

... ... @@ -5,7 +5,7 @@
5 5 #include <time.h>
6 6 #include <json/json.h>
7 7
8   -#include "token.h"
  8 +#include "token/token.h"
9 9 #include "base64.h"
10 10
11 11
... ...
  1 +# ChangeLog for dev-libs/token
  2 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
  3 +# $Header: $
  4 +
  5 +*token-9999 (15 NOV 2011)
  6 +
  7 + 15 NOV 2011; Georg Hopp <georg@steffers.org> initial ebuild created
  8 +
  9 +# vim: set et ts=2 sw=2:
... ...
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
  3 +<pkgmetadata>
  4 + <maintainer>
  5 + <email>georg@steffer.org</email>
  6 + <description>Author of the package</description>
  7 + </maintainer>
  8 + <longdescription>
  9 + This is a C library to create encrypted tokens by using libmcrypt.
  10 + These tokens may contain some json encoded payload data.
  11 + </longdescription>
  12 +</pkgmetadata>
... ...
  1 +# Copyright 1999-2011 Gentoo Foundation
  2 +# Distributed under the terms of the GNU General Public License v2
  3 +# $Header: $
  4 +
  5 +EAPI=4
  6 +inherit eutils git
  7 +
  8 +DESCRIPTION="a library to create encrypted tokens with json payload"
  9 +HOMEPAGE="http://redmine.weird-web-workers.org/projects/ctoken/"
  10 +
  11 +SRC_URI=""
  12 +EGIT_REPO_URI="git://redminie.weird-web-workers.org/var/lib/git/token"
  13 +
  14 +LICENSE="GPL-3"
  15 +SLOT="0"
  16 +KEYWORDS="~x86 ~amd64"
  17 +
  18 +DEPENDS=">=dev-libs/json-c-0.9
  19 + dev-libs/libmcrypt-2.5.8-r2"
  20 +RDEPEND="${DEPEND}"
... ...
1   -nobase_include_HEADERS = cclass.h crypt.h dyntype.h dyntype/hash.h packet.h
  1 +nobase_include_HEADERS = token
... ...
... ... @@ -70,8 +70,6 @@ am__base_list = \
70 70 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
71 71 am__installdirs = "$(DESTDIR)$(includedir)"
72 72 HEADERS = $(nobase_include_HEADERS)
73   -ETAGS = etags
74   -CTAGS = ctags
75 73 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
76 74 ACLOCAL = @ACLOCAL@
77 75 AMTAR = @AMTAR@
... ... @@ -186,7 +184,7 @@ target_alias = @target_alias@
186 184 top_build_prefix = @top_build_prefix@
187 185 top_builddir = @top_builddir@
188 186 top_srcdir = @top_srcdir@
189   -nobase_include_HEADERS = cclass.h crypt.h dyntype.h dyntype/hash.h packet.h
  187 +nobase_include_HEADERS = token
190 188 all: all-am
191 189
192 190 .SUFFIXES:
... ... @@ -249,58 +247,12 @@ uninstall-nobase_includeHEADERS:
249 247 test -n "$$files" || exit 0; \
250 248 echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
251 249 cd "$(DESTDIR)$(includedir)" && rm -f $$files
252   -
253   -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
254   - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
255   - unique=`for i in $$list; do \
256   - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
257   - done | \
258   - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
259   - END { if (nonempty) { for (i in files) print i; }; }'`; \
260   - mkid -fID $$unique
261 250 tags: TAGS
  251 +TAGS:
262 252
263   -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
264   - $(TAGS_FILES) $(LISP)
265   - set x; \
266   - here=`pwd`; \
267   - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
268   - unique=`for i in $$list; do \
269   - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
270   - done | \
271   - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
272   - END { if (nonempty) { for (i in files) print i; }; }'`; \
273   - shift; \
274   - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
275   - test -n "$$unique" || unique=$$empty_fix; \
276   - if test $$# -gt 0; then \
277   - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
278   - "$$@" $$unique; \
279   - else \
280   - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
281   - $$unique; \
282   - fi; \
283   - fi
284 253 ctags: CTAGS
285   -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
286   - $(TAGS_FILES) $(LISP)
287   - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
288   - unique=`for i in $$list; do \
289   - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
290   - done | \
291   - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
292   - END { if (nonempty) { for (i in files) print i; }; }'`; \
293   - test -z "$(CTAGS_ARGS)$$unique" \
294   - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
295   - $$unique
296   -
297   -GTAGS:
298   - here=`$(am__cd) $(top_builddir) && pwd` \
299   - && $(am__cd) $(top_srcdir) \
300   - && gtags -i $(GTAGS_ARGS) "$$here"
301   -
302   -distclean-tags:
303   - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  254 +CTAGS:
  255 +
304 256
305 257 distdir: $(DISTFILES)
306 258 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
... ... @@ -370,7 +322,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
370 322
371 323 distclean: distclean-am
372 324 -rm -f Makefile
373   -distclean-am: clean-am distclean-generic distclean-tags
  325 +distclean-am: clean-am distclean-generic
374 326
375 327 dvi: dvi-am
376 328
... ... @@ -432,18 +384,18 @@ uninstall-am: uninstall-nobase_includeHEADERS
432 384
433 385 .MAKE: install-am install-strip
434 386
435   -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
436   - clean-libtool ctags distclean distclean-generic \
437   - distclean-libtool distclean-tags distdir dvi dvi-am html \
438   - html-am info info-am install install-am install-data \
439   - install-data-am install-dvi install-dvi-am install-exec \
440   - install-exec-am install-html install-html-am install-info \
441   - install-info-am install-man install-nobase_includeHEADERS \
442   - install-pdf install-pdf-am install-ps install-ps-am \
443   - install-strip installcheck installcheck-am installdirs \
444   - maintainer-clean maintainer-clean-generic mostlyclean \
445   - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
446   - tags uninstall uninstall-am uninstall-nobase_includeHEADERS
  387 +.PHONY: all all-am check check-am clean clean-generic clean-libtool \
  388 + distclean distclean-generic distclean-libtool distdir dvi \
  389 + dvi-am html html-am info info-am install install-am \
  390 + install-data install-data-am install-dvi install-dvi-am \
  391 + install-exec install-exec-am install-html install-html-am \
  392 + install-info install-info-am install-man \
  393 + install-nobase_includeHEADERS install-pdf install-pdf-am \
  394 + install-ps install-ps-am install-strip installcheck \
  395 + installcheck-am installdirs maintainer-clean \
  396 + maintainer-clean-generic mostlyclean mostlyclean-generic \
  397 + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
  398 + uninstall-nobase_includeHEADERS
447 399
448 400
449 401 # Tell versions [3.59,3.63) of GNU make to not export all variables.
... ...
1   -#ifndef __TOKEN_H__
2   -#define __TOKEN_H__
3   -
4   -#include "cclass.h"
5   -#include "crypt.h"
6   -#include "dyntype.h"
7   -#include "dyntype/hash.h"
8   -#include "packet.h"
9   -
10   -#endif//__TOKEN_H__
11   -// vim: set et ts=4 sw=4:
... ... @@ -3,7 +3,7 @@
3 3
4 4 #include <sys/types.h>
5 5
6   -#include "cclass.h"
  6 +#include "token/cclass.h"
7 7
8 8
9 9 struct CRYPT {
... ...
... ... @@ -3,11 +3,11 @@
3 3
4 4 #include <sys/types.h>
5 5
6   -#include "cclass.h"
  6 +#include "token/cclass.h"
7 7
8 8 struct DYNTYPE;
9 9
10   -#include "dyntype/hash.h"
  10 +#include "token/dyntype/hash.h"
11 11
12 12
13 13 enum DYNTYPE_TYPES {
... ...
... ... @@ -3,8 +3,8 @@
3 3
4 4 #include <sys/types.h>
5 5
6   -#include "cclass.h"
7   -#include "dyntype.h"
  6 +#include "token/cclass.h"
  7 +#include "token/dyntype.h"
8 8
9 9
10 10 struct DYNTYPE_HASH {
... ...
1 1 #ifndef __PACKET_H__
2 2 #define __PACKET_H__
3 3
4   -#include "cclass.h"
5   -#include "dyntype.h"
  4 +#include "token/cclass.h"
  5 +#include "token/dyntype.h"
6 6
7 7
8 8 enum PACKET_CONTENT_KEYS {
... ...
  1 +#ifndef __TOKEN_H__
  2 +#define __TOKEN_H__
  3 +
  4 +#include "token/cclass.h"
  5 +#include "token/crypt.h"
  6 +#include "token/dyntype.h"
  7 +#include "token/dyntype/hash.h"
  8 +#include "token/packet.h"
  9 +
  10 +#endif//__TOKEN_H__
  11 +// vim: set et ts=4 sw=4:
... ...
... ... @@ -3,7 +3,7 @@
3 3 #include <stdlib.h>
4 4 #include <json/json.h>
5 5
6   -#include "cclass.h"
  6 +#include "token/cclass.h"
7 7
8 8
9 9 void *
... ...
... ... @@ -7,8 +7,8 @@
7 7 #include <mcrypt.h>
8 8 #include <mhash.h>
9 9
10   -#include "cclass.h"
11   -#include "crypt.h"
  10 +#include "token/cclass.h"
  11 +#include "token/crypt.h"
12 12
13 13
14 14 static
... ...
... ... @@ -3,8 +3,8 @@
3 3 #include <sys/types.h>
4 4 #include <json/json.h>
5 5
6   -#include "dyntype.h"
7   -#include "dyntype/hash.h"
  6 +#include "token/dyntype.h"
  7 +#include "token/dyntype/hash.h"
8 8
9 9
10 10 static
... ...
... ... @@ -2,9 +2,9 @@
2 2 #include <stdlib.h>
3 3 #include <json/json.h>
4 4
5   -#include "cclass.h"
6   -#include "dyntype.h"
7   -#include "dyntype/hash.h"
  5 +#include "token/cclass.h"
  6 +#include "token/dyntype.h"
  7 +#include "token/dyntype/hash.h"
8 8
9 9
10 10 #define HASH_ENTRY_CHUNK_SIZE 128
... ...
1 1 #include <json/json.h>
2 2
3   -#include "packet.h"
  3 +#include "token/packet.h"
4 4
5 5
6 6 static
... ...
... ... @@ -4,8 +4,8 @@
4 4 #include <stdio.h>
5 5 #include <sys/types.h>
6 6
7   -#include "cclass.h"
8   -#include "crypt.h"
  7 +#include "token/cclass.h"
  8 +#include "token/crypt.h"
9 9 #include "base64.h"
10 10
11 11
... ...
... ... @@ -4,8 +4,8 @@
4 4 #include <stdio.h>
5 5 #include <sys/types.h>
6 6
7   -#include "cclass.h"
8   -#include "crypt.h"
  7 +#include "token/cclass.h"
  8 +#include "token/crypt.h"
9 9 #include "base64.h"
10 10
11 11
... ...
... ... @@ -2,8 +2,8 @@
2 2 #include <string.h>
3 3 #include <json/json.h>
4 4
5   -#include "cclass.h"
6   -#include "dyntype.h"
  5 +#include "token/cclass.h"
  6 +#include "token/dyntype.h"
7 7
8 8
9 9 #define TEST_STR "this is a foo string"
... ...
... ... @@ -2,8 +2,8 @@
2 2 #include <string.h>
3 3 #include <json/json.h>
4 4
5   -#include "cclass.h"
6   -#include "dyntype/hash.h"
  5 +#include "token/cclass.h"
  6 +#include "token/dyntype/hash.h"
7 7
8 8
9 9 #define TEST_KEY1 "key1"
... ...
... ... @@ -4,10 +4,10 @@
4 4 #include <time.h>
5 5 #include <json/json.h>
6 6
7   -#include "cclass.h"
8   -#include "packet.h"
9   -#include "dyntype.h"
10   -#include "dyntype/hash.h"
  7 +#include "token/cclass.h"
  8 +#include "token/packet.h"
  9 +#include "token/dyntype.h"
  10 +#include "token/dyntype/hash.h"
11 11
12 12
13 13 void
... ...
Please register or login to post a comment