Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

package properly

largely inspired by ERC build system
  • Loading branch information...
commit e00a587cbdf43aa2a6ed230edb09eff50d5b65b1 1 parent c280f44
@sigma authored
View
68 Makefile
@@ -0,0 +1,68 @@
+PKGNAME = gh
+VERSION = 0.1
+SNAPDIR = $(PKGNAME)-$(VERSION)
+
+PKGDEF = $(PKGNAME)-pkg.el
+AUTODEF = $(PKGNAME)-auto.el
+SPECIAL = $(AUTODEF)
+ALLSOURCE = $(wildcard *.el)
+
+SOURCE = $(filter-out $(SPECIAL) $(PKGDEF), $(ALLSOURCE))
+TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
+MISC = README
+
+EMACS = emacs
+SITEFLAG = --no-site-file
+
+PREFIX = /usr/local
+ELISPDIR = $(PREFIX)/share/emacs/site-lisp/$(PKGNAME)
+
+# Location of Emacs Lisp Package Archive entries
+ELPA=../../elpa
+
+all: lisp
+
+lisp: $(TARGET)
+
+autoloads: $(AUTODEF)
+
+$(AUTODEF): $(PKGNAME)-auto.in $(SOURCE)
+ cp $(PKGNAME)-auto.in $(AUTODEF)
+ rm -f $(AUTODEF)c
+ @$(EMACS) -q $(SITEFLAG) -batch -L . \
+ -l $(PKGNAME)-auto \
+ -f gh-generate-autoloads \
+ $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTODEF) .
+
+%.elc: %.el
+ @$(EMACS) -q $(SITEFLAG) -batch -L . \
+ -f batch-byte-compile $<
+
+clean:
+ -rm -f *~ $(TARGET)
+
+realclean: clean
+ -rm -f $(SPECIAL)
+
+install-bin: lisp
+ install -d $(ELISPDIR)
+ install -m 0644 $(ALLSOURCE) $(TARGET) $(ELISPDIR)
+
+install: install-bin
+
+distclean: clean
+ -rm -Rf ../$(SNAPDIR)
+
+release: autoloads distclean
+ mkdir ../$(SNAPDIR) && chmod 0755 ../$(SNAPDIR)
+ cp $(SPECIAL) $(SOURCE) ../$(SNAPDIR)
+ (cd .. && tar cjf $(PKGNAME)-$(VERSION).tar.bz2 $(SNAPDIR)/*)
+
+elpa:
+ rm -fR $(ELPA)/$(SNAPDIR)
+ rm -f $(ELPA)/$(PKGNAME)-$(VERSION).tar
+ mkdir -p $(ELPA)/$(SNAPDIR) && chmod 0755 $(ELPA)/$(SNAPDIR)
+ cp $(SOURCE) $(ELPA)/$(SNAPDIR)
+ sed -r -e "s/%VERSION%/$(VERSION)/g" < $(PKGDEF) \
+ > $(ELPA)/$(SNAPDIR)/$(PKGDEF)
+ (cd $(ELPA) && tar cf $(PKGNAME)-$(VERSION).tar $(SNAPDIR))
View
16 gh-auto.in
@@ -0,0 +1,16 @@
+;;; -*-emacs-lisp-*-
+
+;; Copyright (C) 2002, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+(require 'eieio)
+
+(defun gh-generate-autoloads ()
+ (interactive)
+ (require 'autoload)
+ (let ((backup-inhibited t)
+ (generated-autoload-file (car command-line-args-left))
+ (command-line-args-left (cdr command-line-args-left)))
+ (batch-update-autoloads)))
+
+(provide 'gh-auto)
+;;; Generated autoloads follow (made by autoload.el).
View
49 gh-autoloads.el
@@ -1,49 +0,0 @@
-;;; gh-autoloads.el --- automatically extracted autoloads
-;;
-;;; Code:
-
-
-;;;### (autoloads (gh-api-v3 gh-api) "gh-api" "gh-api.el" (19947
-;;;;;; 20831))
-;;; Generated autoloads from gh-api.el
-
-(eieio-defclass-autoload 'gh-api 'nil "gh-api" "Github API")
-
-(eieio-defclass-autoload 'gh-api-v3 '(gh-api) "gh-api" "Github API v3")
-
-;;;***
-
-;;;### (autoloads (gh-oauth-authenticator gh-password-authenticator
-;;;;;; gh-authenticator) "gh-auth" "gh-auth.el" (19947 20863))
-;;; Generated autoloads from gh-auth.el
-
-(eieio-defclass-autoload 'gh-authenticator 'nil "gh-auth" "Abstract authenticator")
-
-(eieio-defclass-autoload 'gh-password-authenticator '(gh-authenticator) "gh-auth" "Password-based authenticator")
-
-(eieio-defclass-autoload 'gh-oauth-authenticator '(gh-authenticator) "gh-auth" "Oauth-based authenticator")
-
-;;;***
-
-;;;### (autoloads (gh-gist-gist gh-gist-api) "gh-gist" "gh-gist.el"
-;;;;;; (19947 20919))
-;;; Generated autoloads from gh-gist.el
-
-(eieio-defclass-autoload 'gh-gist-api '(gh-api-v3) "gh-gist" "Gist API")
-
-(eieio-defclass-autoload 'gh-gist-gist 'nil "gh-gist" "Gist object")
-
-;;;***
-
-;;;### (autoloads nil nil ("gh-common.el" "gh.el") (19947 20937 987481))
-
-;;;***
-
-(provide 'gh-autoloads)
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; no-update-autoloads: t
-;; coding: utf-8
-;; End:
-;;; gh-autoloads.el ends here
View
1  gh-gist.el
@@ -26,6 +26,7 @@
;;; Code:
+(require 'eieio)
(require 'gh-api)
(require 'gh-auth)
(require 'gh-common)
View
3  gh-pkg.el
@@ -0,0 +1,3 @@
+;;; Package definition for gh.el
+
+(define-package "gh" "%VERSION%" "A GitHub library for Emacs")
View
9 gh.el
@@ -1,8 +1,8 @@
;;; gh.el --- main entry point for gh.el library
-;; Copyright (C) 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2011 Yann Hodique
-;; Author: Yann Hodique <yhodique@vmware.com>
+;; Author: Yann Hodique <yhodique@gmail.com>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
@@ -26,10 +26,7 @@
;;; Code:
-;;; Run the following to update autoloads
-;;; (let ((generated-autoload-file (concat (file-name-directory buffer-file-name) "gh-autoloads.el"))) (update-directory-autoloads "."))
-
-(require 'gh-autoloads)
+(require 'gh-gist)
(provide 'gh)
;;; gh.el ends here
Please sign in to comment.
Something went wrong with that request. Please try again.