From fb9be77a50a31be82378c239ba3a3d791e9b1ffa Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Sun, 29 May 2016 16:25:03 +0200 Subject: [PATCH] Snippet and aur PKGBUILD are now in the main repository --- aur/.gitignore | 9 ++++ aur/PKGBUILD | 46 +++++++++++++++++++ aur/README.md | 2 + .../CMakeLists.txt | 8 ++-- {msh-console-library => library}/command.cpp | 0 {msh-console-library => library}/command.h | 0 .../commandexecutor.cpp | 0 .../commandexecutor.h | 0 {msh-console-library => library}/commands.cpp | 0 {msh-console-library => library}/data.cpp | 0 {msh-console-library => library}/datas.cpp | 0 {msh-console-library => library}/shell.cpp | 2 +- {msh-console-library => library}/shell.h | 0 .../stringtoargcargv.cpp | 0 .../stringtoargcargv.h | 0 snippet/.gitignore | 45 ++++++++++++++++++ {msh-console-library => snippet}/main.cpp | 0 17 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 aur/.gitignore create mode 100644 aur/PKGBUILD create mode 100644 aur/README.md rename {msh-console-library => library}/CMakeLists.txt (81%) rename {msh-console-library => library}/command.cpp (100%) rename {msh-console-library => library}/command.h (100%) rename {msh-console-library => library}/commandexecutor.cpp (100%) rename {msh-console-library => library}/commandexecutor.h (100%) rename {msh-console-library => library}/commands.cpp (100%) rename {msh-console-library => library}/data.cpp (100%) rename {msh-console-library => library}/datas.cpp (100%) rename {msh-console-library => library}/shell.cpp (99%) rename {msh-console-library => library}/shell.h (100%) rename {msh-console-library => library}/stringtoargcargv.cpp (100%) rename {msh-console-library => library}/stringtoargcargv.h (100%) create mode 100644 snippet/.gitignore rename {msh-console-library => snippet}/main.cpp (100%) diff --git a/aur/.gitignore b/aur/.gitignore new file mode 100644 index 0000000..ec170f5 --- /dev/null +++ b/aur/.gitignore @@ -0,0 +1,9 @@ +# src folder +src/ + +# pkg folder +pkg/ + +# created package +*.pkg.tar.xz +*.zip diff --git a/aur/PKGBUILD b/aur/PKGBUILD new file mode 100644 index 0000000..af4c20b --- /dev/null +++ b/aur/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer : praticamentetilde +_name=libmshconsole +_branch=master + +pkgname=libmshconsole +pkgver=0.40f2b2e +pkgrel=1 + +pkgdesc='Library that provides a bash-like interface for CLI C++ programs' +url='https://github.com/praticamentetilde/msh-console.git' +arch=('any') +license=('custom:unlicense') + +depends=() +makedepends=('git' 'gcc' 'cmake') +optdepends=() + +headers=('commandexecutor.h' 'command.h' 'shell.h' 'stringtoargcargv.h') +provides=() +conflicts=() + +pkgver() { + DATE='0' + HASH=$(git ls-remote -h $url $_branch | cut -c1-7) + echo $DATE.$HASH +} + +source=("$pkgname-$(pkgver).zip::https://github.com/praticamentetilde/msh-console/archive/$_branch.zip") +sha512sums=(SKIP) + +#prepare() {} + +package() { + cd msh-console-$_branch/library + cmake CMakeLists.txt + make + mkdir -p "$pkgdir"/usr/include/mshconsole + chmod 0755 "$pkgdir"/usr/include/mshconsole + mv libmshconsole.so libmshconsole.so.1 + install -D -m644 libmshconsole.so.1 "$pkgdir"/usr/lib/libmshconsole.so.1 + ln -s "$pkgdir"/usr/lib/libmshconsole.so.1 "$pkgdir"/usr/lib/libmshconsole.so + for i in "${headers[@]}" + do + install -D -m644 $i "$pkgdir"/usr/include/mshconsole/"$i" + done +} diff --git a/aur/README.md b/aur/README.md new file mode 100644 index 0000000..f3233cf --- /dev/null +++ b/aur/README.md @@ -0,0 +1,2 @@ +# msh-console-aur +AUR package for msh-console diff --git a/msh-console-library/CMakeLists.txt b/library/CMakeLists.txt similarity index 81% rename from msh-console-library/CMakeLists.txt rename to library/CMakeLists.txt index 99d2ae1..41c7668 100644 --- a/msh-console-library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -25,15 +25,15 @@ cmake_minimum_required(VERSION 2.8) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lpopt") list(APPEND SRC_LIST "command.cpp" "commandexecutor.h" "commands.cpp" "datas.cpp" "shell.cpp" "stringtoargcargv.cpp" - "commandexecutor.cpp" "command.h" "data.cpp" "main.cpp" "shell.h" "stringtoargcargv.h") + "commandexecutor.cpp" "command.h" "data.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../msh-console-snippet/main.cpp" "shell.h" "stringtoargcargv.h") -set(lib ON) #off=debug demo with main.cpp, on=library +set(lib Off) #off=debug demo with main.cpp, on=library if(${lib}) MESSAGE(STATUS "Building .so.1") - list(REMOVE_ITEM SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) #remove demo file + list(REMOVE_ITEM SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/../msh-console-script/main.cpp) #remove snippet file add_library (mshconsole SHARED ${SRC_LIST}) else(${lib}) - MESSAGE(STATUS "Building exec (debug only)") + MESSAGE(STATUS "Building msh-console-snippet (debug only)") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") add_executable(${PROJECT_NAME} ${SRC_LIST}) endif(${lib}) diff --git a/msh-console-library/command.cpp b/library/command.cpp similarity index 100% rename from msh-console-library/command.cpp rename to library/command.cpp diff --git a/msh-console-library/command.h b/library/command.h similarity index 100% rename from msh-console-library/command.h rename to library/command.h diff --git a/msh-console-library/commandexecutor.cpp b/library/commandexecutor.cpp similarity index 100% rename from msh-console-library/commandexecutor.cpp rename to library/commandexecutor.cpp diff --git a/msh-console-library/commandexecutor.h b/library/commandexecutor.h similarity index 100% rename from msh-console-library/commandexecutor.h rename to library/commandexecutor.h diff --git a/msh-console-library/commands.cpp b/library/commands.cpp similarity index 100% rename from msh-console-library/commands.cpp rename to library/commands.cpp diff --git a/msh-console-library/data.cpp b/library/data.cpp similarity index 100% rename from msh-console-library/data.cpp rename to library/data.cpp diff --git a/msh-console-library/datas.cpp b/library/datas.cpp similarity index 100% rename from msh-console-library/datas.cpp rename to library/datas.cpp diff --git a/msh-console-library/shell.cpp b/library/shell.cpp similarity index 99% rename from msh-console-library/shell.cpp rename to library/shell.cpp index 27b7e25..0cba943 100644 --- a/msh-console-library/shell.cpp +++ b/library/shell.cpp @@ -195,7 +195,7 @@ namespace mshconsole { waitpid(pid, &status, 0); } } - deleteParams(p.argc,p.argv); + deleteParams(p); } return 0; } diff --git a/msh-console-library/shell.h b/library/shell.h similarity index 100% rename from msh-console-library/shell.h rename to library/shell.h diff --git a/msh-console-library/stringtoargcargv.cpp b/library/stringtoargcargv.cpp similarity index 100% rename from msh-console-library/stringtoargcargv.cpp rename to library/stringtoargcargv.cpp diff --git a/msh-console-library/stringtoargcargv.h b/library/stringtoargcargv.h similarity index 100% rename from msh-console-library/stringtoargcargv.h rename to library/stringtoargcargv.h diff --git a/snippet/.gitignore b/snippet/.gitignore new file mode 100644 index 0000000..1a755a1 --- /dev/null +++ b/snippet/.gitignore @@ -0,0 +1,45 @@ +#kate directory files +*.directory + +#Qt creator .pro.user +*.pro.user +*.cbp +*.txt.user + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# cmake + +CMakeCache.txt +CMakeFiles +CMakeScripts +Makefile +cmake_install.cmake +install_manifest.txt diff --git a/msh-console-library/main.cpp b/snippet/main.cpp similarity index 100% rename from msh-console-library/main.cpp rename to snippet/main.cpp