From ae33efded1474e9ce79d4ff38626fad599366260 Mon Sep 17 00:00:00 2001 From: Thomas Touhey Date: Sun, 22 May 2016 23:13:11 +0200 Subject: [PATCH] Removed Debian packaging for now, modified build/install process --- .gitignore | 2 +- DEBIAN/.gitignore | 1 - DEBIAN/changelog | 6 --- DEBIAN/control | 10 ----- DEBIAN/copyright | 27 ------------ DEBIAN/debian-binary | 1 - DEBIAN/docs | 1 - DEBIAN/rules | 77 ----------------------------------- DEBIAN/rules.cfg | 37 ----------------- Makefile | 32 +++++---------- Makefile.cfg => Makefile.vars | 10 ++--- configure | 54 +++++++++++++++++++++++- debian | 1 - 13 files changed, 69 insertions(+), 190 deletions(-) delete mode 100644 DEBIAN/.gitignore delete mode 100644 DEBIAN/changelog delete mode 100644 DEBIAN/control delete mode 100644 DEBIAN/copyright delete mode 100644 DEBIAN/debian-binary delete mode 100644 DEBIAN/docs delete mode 100755 DEBIAN/rules delete mode 100644 DEBIAN/rules.cfg rename Makefile.cfg => Makefile.vars (93%) delete mode 120000 debian diff --git a/.gitignore b/.gitignore index 80f9b2c..e1345ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ +/Makefile.cfg /obj /libmonochrome.a -/*.deb diff --git a/DEBIAN/.gitignore b/DEBIAN/.gitignore deleted file mode 100644 index 244b0c6..0000000 --- a/DEBIAN/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/all diff --git a/DEBIAN/changelog b/DEBIAN/changelog deleted file mode 100644 index 6315622..0000000 --- a/DEBIAN/changelog +++ /dev/null @@ -1,6 +0,0 @@ -cfx-libmonochrome-dev (1.1) stable; urgency=low - - * Initial release - - -- Thomas Touhey Mon, 9 May 2016 22:09:52 +0100 - diff --git a/DEBIAN/control b/DEBIAN/control deleted file mode 100644 index ff8a77e..0000000 --- a/DEBIAN/control +++ /dev/null @@ -1,10 +0,0 @@ -Package: cfx-libmonochrome-dev -Version: 1.1 -Architecture: all -Maintainer: Thomas Touhey -Build-Depends: sh3eb-elf-gcc-4.9 (=4.9.2), sh3eb-elf-binutils-4.9 (=4.9.2) -Depends: sh3eb-elf-gcc-4.9 (=4.9.2), sh3eb-elf-binutils-4.9 (=4.9.2) -Section: libs -Priority: optional -Homepage: http://git.planet-casio.com/cakeisalie5/libmonochrome -Description: Fast and efficient drawing static library for CASIO fx calculators. diff --git a/DEBIAN/copyright b/DEBIAN/copyright deleted file mode 100644 index d73734e..0000000 --- a/DEBIAN/copyright +++ /dev/null @@ -1,27 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: cfx-libmonochrome-dev -Upstream-Contact: Thomas Touhey -Source: http://git.planet-casio.com/cakeisalie5/libmonochrome - -Files: * -Copyright: © 2011 Pierre "PierrotLL" Le Gall -License: GPL-3+ - 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 . - -Files: Makefile* - man/* - debian/* -Copyright: © 2016 Thomas "CakeIsALie5" Touhey -License: Same - Same as libmonochrome itself diff --git a/DEBIAN/debian-binary b/DEBIAN/debian-binary deleted file mode 100644 index cd5ac03..0000000 --- a/DEBIAN/debian-binary +++ /dev/null @@ -1 +0,0 @@ -2.0 diff --git a/DEBIAN/docs b/DEBIAN/docs deleted file mode 100644 index b43bf86..0000000 --- a/DEBIAN/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/DEBIAN/rules b/DEBIAN/rules deleted file mode 100755 index 577c5a5..0000000 --- a/DEBIAN/rules +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/make -f -#******************************************************************************# -# # -# debian/rules # -# | Project : libmonochrome # -# # -# By: thomas # -# Last updated: 2015/12/23 10:02:49 # -# # -#******************************************************************************# -# Who said you had to use automatic tools to make Debian packages ? # -#******************************************************************************# -# LOAD CONFIG -include $(CURDIR)/rules.cfg - -# STYLE VARS -define \n - - -endef - -# RULES -## Build the source into compiled programs/formatted documents -## in the build-tree. -build: build-arch build-indep - -## Build the source into arch-dependent formatted documents -## in the build-tree. -build-arch: - -## Build the source into arch-independent formatted documents -## in the build-tree. -build-indep: - make -C .. - -## Install files into a file tree for each binary package under the debian dir. -## If defined, binary* targets effectively depend on this target. -install: - $(foreach lib, $(LIB), \ - $(INST) -m 644 ../$(LIBDIR)/$(lib) $(ARCH)$(LIBROOT)/$(lib)$(\n)) - $(foreach inc, $(INC), \ - $(INST) -m 644 ../$(INCDIR)/$(inc) $(ARCH)$(INCROOT)/$(inc)$(\n)) - $(foreach man, $(MAN), \ - $(INST) -m 644 ../$(MANDIR)/$(man) $(ARCH)$(MANROOT)/$(man)$(\n)) - -## Create all binary packages -binary: binary-arch binary-indep - -## Create arch-dependent binary packages in the parent directory -binary-arch: - -## Create arch-independent binary packages in the parent directory -binary-indep: - cd all && tar cf ../data.tar.gz ./* - rm -f md5sums - cd $(ARCH) && for i in $$(find * -type f); \ - do md5sum "$$i" >> ../md5sums; done - tar cf control.tar.gz ./control ./md5sums - ar rc ../$(PKG)_$(VERSION)_$(ARCH).deb data.tar.gz control.tar.gz \ - debian-binary - rm data.tar.gz control.tar.gz md5sums - -## Clean all compiled/generated/useless files in the build-tree. -clean: - rm -rf $(ARCH) - make -C .. fclean - -## [Non-standard] remakes everything -re: clean build install binary - -## Phony everything -.PHONY: build build-arch build-indep -.PHONY: install -.PHONY: binary binary-arch binary-indep -.PHONY: clean re - -# END OF FILE diff --git a/DEBIAN/rules.cfg b/DEBIAN/rules.cfg deleted file mode 100644 index eed4430..0000000 --- a/DEBIAN/rules.cfg +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/make -f -#******************************************************************************# -# _____ _ # -# debian/rules.cfg |_ _|__ _ _| |__ ___ _ _ # -# | Project : Caphics | |/ _ \| | | | '_ \ / _ \ | | | # -# | | (_) | |_| | | | | __/ |_| | # -# By: thomas |_|\___/ \__,_|_| |_|\___|\__, |.fr # -# Last updated: 2016/05/18 19:05:14 |___/ # -# # -#******************************************************************************# -# PROJECT INFORMATION -NAME = $(shell make -s -C .. getname) -VERSION = $(shell make -s -C .. getversion) - -# PACKAGE INFORMATION -PKG = cfx-lib$(NAME)-dev -ARCH = all - -# FILES -LIBDIR = $(shell make -C .. -s getlibdir) -LIB = $(shell make -s -C .. getlib) -INCDIR = $(shell make -C .. -s getincdir) -INC = $(shell make -s -C .. getinc) -MANDIR = $(shell make -C .. -s getmandir) -MAN = $(shell make -s -C .. getman) - -# BIN UTILITIES -MAKE = make -C -INST = install -D - -# TREE INFORMATION -GCCROOT = /usr/share/sh3eb-elf -LIBROOT = $(GCCROOT)/lib/$(NAME)/$(VERSION) -INCROOT = $(LIBROOT)/include -MANROOT = /usr/share/man - -# END OF FILE diff --git a/Makefile b/Makefile index 802924c..8b1bf1f 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,12 @@ # # #******************************************************************************# # INCLUDE CONFIGURATION +include $(CURDIR)/Makefile.vars include $(CURDIR)/Makefile.cfg # DEDUCED VARIABLES ALLOBJ = $(SRC:%=$(OBJDIR)/%.o) -ALLINCPUB = $(INCPUB:%=$(INCDIR)/%.h) -ALLINC = $(ALLINCPUB) $(INCINT:%=$(INCDIR)/%.h) +ALLINC = $(INCPUB:%=$(INCDIR)/%.h) $(INCINT:%=$(INCDIR)/%.h) # STYLE VARS define \n @@ -49,26 +49,16 @@ fclean: clean ## Remake the project re: fclean all -## Give vars (for packaging) -getname: - @echo $(NAME) -getversion: - @echo $(VERSION) -getlibdir: - @echo . -getlib: - @echo lib$(NAME).a -getmandir: - @echo $(MANDIR) -getman: - @echo $(addprefix man3/,$(MAN3)) -getincdir: - @echo $(INCDIR) -getinc: - @echo $(INCPUB:%=%.h) +## Install project +install: + $(INST) -D -m 644 lib$(NAME).a $(ILIBDIR)/lib$(NAME).a + $(foreach inc, $(INCPUB), \ + $(INST) -D -m 644 $(INCDIR)/$(inc).h $(IINCDIR)/$(inc).h$(\n)) + $(foreach man, $(MAN), \ + $(INST) -D -m 644 $(MANDIR)/$(man) $(IMANDIR)/$(man)$(\n)) + $(GZIP) $(MAN:%=$(IMANDIR)/%) ## Doz rulz are phunny -.PHONY: all clean fclean re -.PHONY: getname getversion getlibdir getlib getmandir getman getincdir getinc +.PHONY: all clean fclean re install # END OF FILE diff --git a/Makefile.cfg b/Makefile.vars similarity index 93% rename from Makefile.cfg rename to Makefile.vars index f5115de..6e231f1 100644 --- a/Makefile.cfg +++ b/Makefile.vars @@ -44,8 +44,7 @@ INCPUB = monochrome INCINT = monochrome/internals # MANPAGES -MAN3 = $(addsuffix .3,libmonochrome \ - ml_bmp ml_bmp_8_and ml_bmp_8_or ml_bmp_8_xor \ +MAN3 = ml_bmp ml_bmp_8_and ml_bmp_8_or ml_bmp_8_xor \ ml_bmp_8_and_cl ml_bmp_8_or_cl ml_bmp_8_xor_cl \ ml_bmp_16_and ml_bmp_16_or ml_bmp_16_xor \ ml_bmp_16_and_cl ml_bmp_16_or_cl ml_bmp_16_xor_cl \ @@ -58,7 +57,8 @@ MAN3 = $(addsuffix .3,libmonochrome \ ml_polygon ml_filled_polygon \ ml_scroll ml_vertical_scroll ml_horizontal_scroll \ ml_vram ml_vram_adress ml_clear_screen ml_clear_vram \ - ml_display_vram ml_contrast ml_get_contrast ml_set_contrast) + ml_display_vram ml_contrast ml_get_contrast ml_set_contrast +MAN = $(MAN3:%=man3/%.3) # BIN UTILITIES ## Platform @@ -74,8 +74,8 @@ RANLIB = $(PLATFORM)ranlib MKDIR = mkdir -p ## File remover RM = rm -f -## Gzip Compressor -GZP = gzip +## Compressor +GZIP = gzip ## Installer INST = /usr/bin/install diff --git a/configure b/configure index 948a84c..e21930a 100755 --- a/configure +++ b/configure @@ -1,4 +1,54 @@ #!/bin/sh -# We don't need ./configure, but we'll put it there so that any system used to -# Debian package making isn't lost :) +# Help +usage() { +cat <&1 1>Makefile.cfg + +cat <&3 3>&- + +# We're done +echo "Configuration loaded, you can make now." diff --git a/debian b/debian deleted file mode 120000 index 0a4e1e8..0000000 --- a/debian +++ /dev/null @@ -1 +0,0 @@ -DEBIAN \ No newline at end of file