[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/caml 06c445b 06/14: Generate the OPAM file in the packages
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/caml 06c445b 06/14: Generate the OPAM file in the packages/ directory |
Date: |
Tue, 24 Aug 2021 05:57:22 -0400 (EDT) |
branch: elpa/caml
commit 06c445b6fd8a2dc267d1bab8a37bc2f4540b9627
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Generate the OPAM file in the packages/ directory
- Warn if the link “packages” is not present.
- Take the version from caml.el
---
Makefile | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index 53b0761..b10ea1f 100644
--- a/Makefile
+++ b/Makefile
@@ -12,13 +12,14 @@
#* *
#**************************************************************************
-VERSION = $(shell grep "^version" caml-mode.opam \
- | sed -e 's/version: *"\([^"]*\)"/\1/')
+VERSION = $(shell grep "^;; *Version" caml.el \
+ | sed -e 's/;; *Version: *\([^ \t]*\)/\1/')
DESCRIPTION = $(shell grep ';;; caml.el ---' caml.el \
| sed 's/[^-]*--- *\(.*\)/\1/')
DIST_DIR = caml-mode-$(VERSION)
OPAM_DIR = caml-mode.$(VERSION)
TARBALL = caml-mode-$(VERSION).tgz
+OPAM_FILE = packages/caml-mode/caml-mode.$(VERSION)/opam
# Files to install
FILES= caml-font.el caml.el camldebug.el \
@@ -50,8 +51,9 @@ endif
endif
EMACS ?= emacs
-# Where to install ocamltags script
-SCRIPTDIR = $(BINDIR)
+INSTALL_MKDIR = mkdir -p
+INSTALL_DATA = $(CP)
+INSTALL_RM_R = $(RM) -r
# Command for byte-compiling the files
COMPILECMD=(progn \
@@ -101,17 +103,6 @@ ocamltags: ocamltags.in
install-ocamltags: ocamltags
$(INSTALL_DATA) ocamltags $(SCRIPTDIR)/ocamltags
-# OPAM
-.PHONY: opam
-opam: $(TARBALL)
- mkdir -p $(OPAM_DIR)
- cp -a caml-mode.opam $(OPAM_DIR)/opam
- echo "url {" >> $(OPAM_DIR)/opam
- echo " src:
\"`pwd`/https://github.com/ocaml/caml-mode/releases/download/$(VERSION)/$(TARBALL)\""
>> $(OPAM_DIR)/opam
- echo " checksum: \"md5=`md5sum $(TARBALL) | cut -d ' ' -f 1`\"" \
- >> $(OPAM_DIR)/opam
- echo "}" >> $(OPAM_DIR)/opam
-
$(TARBALL): $(DIST_FILES)
mkdir -p $(DIST_DIR)
for f in $(DIST_FILES); do cp $$f $(DIST_DIR); done
@@ -123,7 +114,21 @@ $(TARBALL): $(DIST_FILES)
# This is for testing purposes
compile-only:
$(EMACS) --batch --eval '$(COMPILECMD)'
+submit: $(TARBALL)
+ @if [ ! -d packages/ ]; then \
+ echo "Make a symbolic link packages → OPAM repository/packages"; \
+ exit 1; \
+ fi
+ $(INSTALL_MKDIR) $(dir $(OPAM_FILE))
+ sed -e "s/VERSION/$(VERSION)/" caml-mode.opam > $(OPAM_FILE)
+ echo "url {" >> $(OPAM_FILE)
+ echo " src:
\"https://github.com/ocaml/caml-mode/releases/download/$(VERSION)/$(TARBALL)\""
>> $(OPAM_FILE)
+ echo " checksum: \"md5=`md5sum $(TARBALL) | cut -d ' ' -f 1`\"" \
+ >> $(OPAM_FILE)
+ echo "}" >> $(OPAM_FILE)
clean:
rm -f ocamltags *~ \#*# *.elc
- $(RM) -r $(TARBALL) $(OPAM_DIR)
+ $(RM) -r $(TARBALL)
+
+
- [nongnu] elpa/caml updated (118fade -> f04c2e4), ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml fb9b42c 02/14: Derive caml-mode from prog-mode, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml f69b62b 03/14: Fix some warnings and require Emacs ≥ 24.3, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 3057965 04/14: Remove caml-string-to-int, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 06c445b 06/14: Generate the OPAM file in the packages/ directory,
ELPA Syncer <=
- [nongnu] elpa/caml 5f26293 08/14: Makefile: only compile the elisp code as default target, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml ad39af1 09/14: Simplify the “install” make target, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml cf6a092 01/14: Put the groups in the 'languages standard group, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml aba3de4 05/14: Subtler detection of Emacs executable, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 7eec9fb 07/14: Makefile: replace DIST_DIR with DIST_NAME, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 372df7a 10/14: Makefile: add a “tarball” target for convenience, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 6d4f18e 11/14: Update caml.el header, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 38088c3 12/14: Ignore the “packages” symbolic link, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml 6fe87ee 13/14: Update the OPAM file, ELPA Syncer, 2021/08/24
- [nongnu] elpa/caml f04c2e4 14/14: Makefile: add uninstall targets, ELPA Syncer, 2021/08/24