Skip to content

Commit

Permalink
Add More standards for I-Nex
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Feb 6, 2014
1 parent 3dfdf04 commit 8a93e93
Show file tree
Hide file tree
Showing 40 changed files with 6,771 additions and 150 deletions.
41 changes: 41 additions & 0 deletions JSON/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/make -f
include ../i-nex.mk

make-binary:
@echo -e '\033[1;32mCompile i-nex-edid\033[0m'
$(CC) -o i-nex-edid i-nex-edid.c $(CFLAGS) $(additional_confflags)
@echo -e '\033[1;32mCompile i-nex-cpuid\033[0m'
$(CC) -o i-nex-cpuid i-nex-cpuid.c -static $(CC_OPTS_LIBCPUID) $(additional_confflags)
@echo -e '\033[1;32mCompile i-nex-usage\033[0m'
$(CC) -o i-nex-usage i-nex-usage.c -static $(CC_OPTS_LIBPROCPS) $(additional_confflags)
@echo -e '\033[1;32mCompile i-nex-cpusage\033[0m'
$(CC) -o i-nex-cpusage i-nex-cpusage.c $(additional_confflags)
@echo -e '\033[1;32mCompile i-nex-glinfo\033[0m'
$(CC) -o i-nex-glinfo i-nex-glinfo.c $(libx11) $(libgl) $(libxext) $(additional_confflags)
@echo -e '\033[1;32mCompile i-nex-uname\033[0m'
$(CC) -o i-nex-uname i-nex-uname.c $(additional_confflags)

install-bin:

mkdir -p $(DESTDIR)$(bindir)
chmod +x i-nex-edid
chmod +x i-nex-cpuid
chmod +x i-nex-usage
chmod +x i-nex-cpusage
chmod +x i-nex-glinfo
chmod +x i-nex-uname
$(INSTALL) 0755 i-nex-edid $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-cpuid $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-usage $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-cpusage $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-glinfo $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-uname $(DESTDIR)$(bindir)
clean:
$(RM_COM) $(RMFILE_OPT) i-nex-edid
$(RM_COM) $(RMFILE_OPT) i-nex-cpuid
$(RM_COM) $(RMFILE_OPT) i-nex-usage
$(RM_COM) $(RMFILE_OPT) i-nex-cpusage
$(RM_COM) $(RMFILE_OPT) i-nex-glinfo
$(RM_COM) $(RMFILE_OPT) i-nex-uname

install: make-binary install-bin
113 changes: 13 additions & 100 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,81 +1,11 @@
#!/usr/bin/make -f
GIT_RV = $(shell git rev-list HEAD | wc -l)
BUILD_PACKAGE = $(shell ./build-deb)
PKG_INSTALL = apt-get install
AS_ROOT = sudo
CFLAGS = -g -Wall
LSB_CS = $(shell lsb_release -cs)
CC_OPTS_LIBCPUID = $(shell pkg-config libcpuid --cflags --libs)
libgl = $(shell pkg-config gl --cflags --libs)
libx11 = $(shell pkg-config x11 --cflags --libs)
libxext = $(shell pkg-config xext --cflags --libs)
GBC = /usr/bin/gbc3
GBCOPTS = -eagtpm
GBA = gba3
CC = gcc
ARCH=$(shell uname -m)
bindir ?= /usr/bin
INSTALL = install -m
bzr_revision =
BUILD_SELF_EXECUTABLE = ./build-selfexecutable
RM_COM = rm
RMFILE_OPT = -f
RMDIR_OPT = -Rf
COMPRESSION_SELF_LEVEL = 9
MAKESELF = ./makeself.sh
MAKESELF_OPT = --nowait
APP_NAME= I-Nex
INSTALL_SELF_SCRIPT = ./install-self
ifeq ($(ARCH),x86)
additional_confflags := --disable-sse2
endif
ifeq ($(ARCH),x86_64)
additional_confflags := -O2
endif
ifeq ($(LSB_CS),precise)
CC_OPTS_LIBPROCPS = -lproc
else
CC_OPTS_LIBPROCPS = $(shell pkg-config libprocps --cflags --libs)
endif
dependency_build ?= git \
devscripts \
pkg-config \
dpkg-dev \
gambas3-dev \
gambas3-gb-image \
gambas3-gb-gtk \
gambas3-gb-form \
gambas3-gb-desktop \
gambas3-gb-form-stock \
dpkg \
grep \
mount \
procps \
x11-xserver-utils \
lsb-release \
bash \
coreutils \
sed \
pciutils \
x11-utils \
mesa-utils \
hostname \
libcpuid11 \
libprocps0-dev
include i-nex.mk

make:
@printf "\033[1;31mCompile edid-decode as inex-decode \033[0m$1\n"
$(CC) -o i-nex-edid JSON/i-nex-edid.c $(CFLAGS) $(additional_confflags)
$(CC) -o i-nex-cpuid JSON/i-nex-cpuid.c -static $(CC_OPTS_LIBCPUID) $(additional_confflags)
$(CC) -o i-nex-usage JSON/i-nex-usage.c -static $(CC_OPTS_LIBPROCPS) $(additional_confflags)
$(CC) -o i-nex-cpusage JSON/i-nex-cpusage.c $(additional_confflags)
$(CC) -o i-nex-glinfo JSON/i-nex-glinfo.c $(libx11) $(libgl) $(libxext) $(additional_confflags)
$(CC) -o i-nex-uname JSON/i-nex-uname.c $(additional_confflags)
@printf "\033[1;31mCompile src/i-nex stage 1 \033[0m$1\n"
$(GBC) $(GBCOPTS) src/i-nex
@printf "\033[1;31mCompile src/i-nex stage 2 \033[0m$1\n"
$(GBA) src/i-nex
build-inex:
./src/configure
$(MAKE) -C src
$(MAKE) -C pixmaps
$(MAKE) -C JSON

deb:

Expand Down Expand Up @@ -114,12 +44,9 @@ self:
$(INSTALL) 0755 debian/i-nex.desktop inex/usr/share/applications/
$(INSTALL) 0755 debian/check_kernel inex/usr/bin/
$(INSTALL) 0755 debian/i-nex-lspci inex/usr/bin/
$(INSTALL) 0755 I-Nex.LICENSE inex/usr/share/doc/i-nex/
$(INSTALL) 0755 Pastebinit.LICENSE inex/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 pastebin.d/* inex/usr/share/i-nex/pastebinit/pastebin.d/
$(INSTALL) 0755 pastebinit inex/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 pastebinit.xml inex/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 README inex/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 release.conf inex/usr/share/i-nex/pastebinit/
$(INSTALL) 0775 usr/bin/gbx3 inex/usr/bin/gbx3
$(INSTALL) 0775 usr/bin/gbr3 inex/usr/bin/gbr3
Expand Down Expand Up @@ -164,12 +91,6 @@ self:

clean:

$(RM_COM) $(RMFILE_OPT) i-nex-edid
$(RM_COM) $(RMFILE_OPT) i-nex-cpuid
$(RM_COM) $(RMFILE_OPT) i-nex-usage
$(RM_COM) $(RMFILE_OPT) i-nex-cpusage
$(RM_COM) $(RMFILE_OPT) i-nex-glinfo
$(RM_COM) $(RMFILE_OPT) i-nex-uname
$(RM_COM) $(RMDIR_OPT) `find . -name ".gambas"`
$(RM_COM) $(RMDIR_OPT) `find . -name "*.gambas"`
$(RM_COM) $(RMDIR_OPT) `find . -name ".directory"`
Expand All @@ -189,44 +110,34 @@ clean:
$(RM_COM) $(RMDIR_OPT) debian/changelog1
$(RM_COM) $(RMDIR_OPT) inex
$(RM_COM) $(RMDIR_OPT) usr
$(MAKE) -C src distclean
$(MAKE) -C pixmaps clean
$(MAKE) -C JSON clean

install:
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)/usr/share/pixmaps/
mkdir -p $(DESTDIR)/usr/share/applications/
mkdir -p $(DESTDIR)/usr/share/doc/i-nex/
mkdir -p $(DESTDIR)/usr/share/i-nex/pastebinit/
mkdir -p $(DESTDIR)/usr/share/i-nex/pastebinit/pastebin.d/
chmod +x i-nex
chmod +x i-nex-edid
chmod +x i-nex-cpuid
chmod +x i-nex-usage
chmod +x i-nex-cpusage
chmod +x i-nex-glinfo
chmod +x i-nex-uname
chmod +x debian/check_kernel
chmod +x debian/i-nex-lspci
$(INSTALL) 0755 i-nex $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-edid $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-cpuid $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-usage $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-cpusage $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-glinfo $(DESTDIR)$(bindir)
$(INSTALL) 0755 i-nex-uname $(DESTDIR)$(bindir)
$(INSTALL) 0755 src/i-nex/i-nex.gambas $(DESTDIR)$(bindir)
$(INSTALL) 0755 debian/i-nex.desktop $(DESTDIR)/usr/share/applications/
$(INSTALL) 0755 debian/check_kernel $(DESTDIR)/usr/bin/
$(INSTALL) 0755 debian/i-nex-lspci $(DESTDIR)/usr/bin/
$(INSTALL) 0755 I-Nex.LICENSE $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 Pastebinit.LICENSE $(DESTDIR)/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 pastebin.d/* $(DESTDIR)/usr/share/i-nex/pastebinit/pastebin.d/
$(INSTALL) 0755 pastebinit $(DESTDIR)/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 pastebinit.xml $(DESTDIR)/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 README $(DESTDIR)/usr/share/i-nex/pastebinit/
$(INSTALL) 0755 release.conf $(DESTDIR)/usr/share/i-nex/pastebinit/
$(MAKE) -C pixmaps install
$(MAKE) -C changelogs install
$(MAKE) -C manpages install
$(MAKE) -C docs install
$(MAKE) -C JSON install

uninstall:

Expand Down Expand Up @@ -262,4 +173,6 @@ rmgambas:
$(RM_COM) $(RMFILE_OPT) /usr/lib/gambas3/gb.gui.opengl.so
$(RM_COM) $(RMFILE_OPT) /usr/lib/gambas3/gb.gui.so
$(RM_COM) $(RMFILE_OPT) /usr/lib/gambas3/gb.image.so
$(RM_COM) $(RMFILE_OPT) /usr/lib/gambas3/gb.qt4.so
$(RM_COM) $(RMFILE_OPT) /usr/lib/gambas3/gb.qt4.so

make: build-inex
45 changes: 32 additions & 13 deletions changelogs/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
#!/usr/bin/make -f
INSTALL = install -m
install:
$(INSTALL) 0755 changelog-0.4.6 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.4.8 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.4.8.1 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.0 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.1 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.2 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.4 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.6 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.5.8 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.6.0 $(DESTDIR)/usr/share/doc/i-nex/
$(INSTALL) 0755 changelog-0.6.2 $(DESTDIR)/usr/share/doc/i-nex/
VERSION = $(shell grep 'Version=' ../src/i-nex/.project | cut -d '=' -f 2)
PN = i-nex

PREFIX ?= /usr
DOCDIR = $(PREFIX)/share/doc/$(PN)-$(VERSION)

install-changelogs:
@echo -e '\033[1;32mInstalling Changelogs...\033[0m'
install -Dm644 changelog-0.4.6 "$(DESTDIR)$(DOCDIR)/changelog-0.4.6"
install -Dm644 changelog-0.4.8 "$(DESTDIR)$(DOCDIR)/changelog-0.4.8"
install -Dm644 changelog-0.4.8.1 "$(DESTDIR)$(DOCDIR)/changelog-0.4.8.1"
install -Dm644 changelog-0.5.0 "$(DESTDIR)$(DOCDIR)/changelog-0.5.0"
install -Dm644 changelog-0.5.1 "$(DESTDIR)$(DOCDIR)/changelog-0.5.1"
install -Dm644 changelog-0.5.2 "$(DESTDIR)$(DOCDIR)/changelog-0.5.2"
install -Dm644 changelog-0.5.4 "$(DESTDIR)$(DOCDIR)/changelog-0.5.4"
install -Dm644 changelog-0.5.6 "$(DESTDIR)$(DOCDIR)/changelog-0.5.6"
install -Dm644 changelog-0.5.8 "$(DESTDIR)$(DOCDIR)/changelog-0.5.8"
install -Dm644 changelog-0.6.0 "$(DESTDIR)$(DOCDIR)/changelog-0.6.0"
install -Dm644 changelog-0.6.2 "$(DESTDIR)$(DOCDIR)/changelog-0.6.2"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.4.6"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.4.8"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.4.8.1"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.0"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.1"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.2"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.4"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.6"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.5.8"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.6.0"
gzip -9 "$(DESTDIR)$(DOCDIR)/changelog-0.6.2"

install: install-changelogs
14 changes: 0 additions & 14 deletions debian/docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/i-nex.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ debian/i-nex-lspci usr/bin
pastebin.d usr/share/i-nex/pastebinit
pastebinit usr/share/i-nex/pastebinit
pastebinit.xml usr/share/i-nex/pastebinit
README usr/share/i-nex/pastebinit
release.conf usr/share/i-nex/pastebinit
i-nex usr/bin
8 changes: 0 additions & 8 deletions debian/i-nex.manpages

This file was deleted.

16 changes: 8 additions & 8 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ override_dh_pysupport:
override_dh_builddeb:
dh_builddeb -- -z9 -Zxz
override_dh_installman:
dh_installman debian/manpages/check_kernel.1 -p i-nex
dh_installman debian/manpages/i-nex-lspci.1 -p i-nex
dh_installman debian/manpages/i-nex.1 -p i-nex
dh_installman debian/manpages/i-nex.gambas.1 -p i-nex
dh_installman debian/manpages/i-nex-edid.1 -p i-nex
dh_installman debian/manpages/i-nex-cpuid.1 -p i-nex
dh_installman debian/manpages/i-nex-usage.1 -p i-nex
dh_installman debian/manpages/i-nex-cpusage.1 -p i-nex
dh_installman manpages/check_kernel.1 -p i-nex
dh_installman manpages/i-nex-lspci.1 -p i-nex
dh_installman manpages/i-nex.1 -p i-nex
dh_installman manpages/i-nex.gambas.1 -p i-nex
dh_installman manpages/i-nex-edid.1 -p i-nex
dh_installman manpages/i-nex-cpuid.1 -p i-nex
dh_installman manpages/i-nex-usage.1 -p i-nex
dh_installman manpages/i-nex-cpusage.1 -p i-nex
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/make -f
VERSION = $(shell grep 'Version=' ../src/i-nex/.project | cut -d '=' -f 2)
PN = i-nex

PREFIX ?= /usr
DOCDIR = $(PREFIX)/share/doc/$(PN)-$(VERSION)

create-dir:
@echo -e '\033[1;32mCreate directory...\033[0m'
mkdir -p $(DESTDIR)$(DOCDIR)

install-doc:
@echo -e '\033[1;32mInstalling Docs...\033[0m'
install -Dm644 copyright "$(DESTDIR)$(DOCDIR)/copyright"
install -Dm644 I-Nex.LICENSE "$(DESTDIR)$(DOCDIR)/I-Nex.LICENSE"
install -Dm644 Pastebinit.LICENSE "$(DESTDIR)$(DOCDIR)/Pastebinit.LICENSE"
gzip -9 "$(DESTDIR)$(DOCDIR)/copyright"
gzip -9 "$(DESTDIR)$(DOCDIR)/I-Nex.LICENSE"
gzip -9 "$(DESTDIR)$(DOCDIR)/Pastebinit.LICENSE"

install: create-dir install-doc
File renamed without changes.

0 comments on commit 8a93e93

Please sign in to comment.