From 7fd8cf59902ecb42710215b1b69acc2e926114ab Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 7 Jul 2015 03:31:24 +0430 Subject: [PATCH] fpkg library added --- Cask | 1 + fg42 | 2 +- fg42-config.el | 14 +++++++++++-- lib/fpkg.el | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 lib/fpkg.el diff --git a/Cask b/Cask index 0a7d488..47c37b3 100644 --- a/Cask +++ b/Cask @@ -38,3 +38,4 @@ ;(depends-on "use-package") ;(depends-on "web-mode") ;(depends-on "yasnippet") +;(depends-on "color-theme-monokai") diff --git a/fg42 b/fg42 index 95a5c77..a8b70d6 100755 --- a/fg42 +++ b/fg42 @@ -1,4 +1,4 @@ #! /bin/sh #cask exec emacs -Q --no-splash --name FG42 --title FG42 -q -l /home/lxsameer/src/FG42/FG42/fg42-config.el "$@" -cask exec emacs -l --name FG42 /home/lxsameer/src/FG42/FG42/fg42-config.el "$@" +emacs -l --name FG42 /home/lxsameer/src/FG42/FG42/fg42-config.el "$@" diff --git a/fg42-config.el b/fg42-config.el index 0847880..8ca6933 100644 --- a/fg42-config.el +++ b/fg42-config.el @@ -1,3 +1,13 @@ -(require 'cask "~/.cask/cask.el") -(cask-initialize "/home/lxsameer/src/FG42/FG42/") +(add-to-list 'load-path "./lib") (toggle-debug-on-error) +(require 'fpkg) + +(depends-on "f" + :version "0" + :path "asdasdasd") + +(describe-variable 'required-packages) +;(require 'cask "~/.cask/cask.el") +;(cask-initialize "/home/lxsameer/src/FG42/FG42/") + +;(require 'fg42-core) diff --git a/lib/fpkg.el b/lib/fpkg.el new file mode 100644 index 0000000..3d7f725 --- /dev/null +++ b/lib/fpkg.el @@ -0,0 +1,53 @@ +;;; fpkg --- a simple package manager for FG42 -*- lexical-binding: t; -*- + +;; Copyright (C) 2015 lxsameer + +;; Author: Nic Ferrier +;; Keywords: lisp fg42 IDE package manager +;; Version: 1.0.0 + +;; 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 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Simple package manager for FG42 + +;;; Code: +(require 'cl-lib) + +(message "Initializing FPKG") + +;; Variables --------------------------------- +(cl-defstruct fpkg-dependency + "Package structure for FG42." + name + (version "0") + (github nil) + (path nil)) + +(defvar required-packages (make-hash-table) + "A hash of `fg42-package structure representing required packages.") + +;; Functions ---------------------------------- +(defun fpkg-initialize () + "Initilize the package.el and related stuff to be used in FG42" + + ) + +(defun depends-on (pkgname &rest args) + "Global function to specify a single dependency" + (let ((pkg (apply 'make-fpkg-dependency :name pkgname args))) + (puthash pkgname pkg required-packages))) + +(provide 'fpkg)