diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index c9a411a..d95af2b 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,12 @@ +------------------------------------------------------------------------------------------------------------------------------------ +MPM V 1.1.1 - A. GIBERT - 2026/03/21 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add bash completion support, +- Fix html file location. + + + ------------------------------------------------------------------------------------------------------------------------------------ MPM V 1.1.0 - A. GIBERT - 2026/03/14 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/SPECS/mpm.spec b/SPECS/mpm.spec index e58a55f..bbc92b1 100644 --- a/SPECS/mpm.spec +++ b/SPECS/mpm.spec @@ -1,5 +1,29 @@ +#----------------------------------------------------------------------------------------------------------------------------------- +# +# MPM (Meta Package Manager) +# Copyright (C) 2024-2026 Arnaud G. GIBERT +# mailto:arnaud@rx3.net +# +# 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 2 +# of the License, or 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +#----------------------------------------------------------------------------------------------------------------------------------- + + + %define name mpm -%define version 1.1.0 +%define version 1.1.1 %define release %mkrel 1rx3 %global debug_package %{nil} @@ -68,14 +92,15 @@ This is the server repository. %install # Client -install -D -pm 644 etc/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf -install -D -pm 755 sbin/%{name} %{buildroot}%{_sbindir}/%{name} +install -D -pm 644 etc/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf +install -D -pm 644 etc/bash_completion.d/%{name} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} +install -D -pm 755 sbin/%{name} %{buildroot}%{_sbindir}/%{name} # Server -cd var/www/%{name}-repository +cd var/www/html/%{name}-repository for file in *.mpm do - install -D -pm 644 ${file} %{buildroot}%{_webhtml}/%{name}-repository/${file} + install -D -pm 644 ${file} %{buildroot}%{_webhtml}/%{name}-repository/${file} done @@ -100,6 +125,7 @@ done %doc ReadMe.txt ReleaseNotes.txt ToDo.txt %license GNU_GPL-3.0.txt %config(noreplace) %{_sysconfdir}/%{name}.conf +%{_sysconfdir}/bash_completion.d/%{name} %{_sbindir}/%{name} @@ -116,5 +142,10 @@ done #----------------------------------------------------------------------------------------------------------------------------------- %changelog +* Sat Mar 21 2026 Arnaud G. GIBERT - 1.1.1-1rx3.mga9 +- Update to 1.1.1 +- Add bash completion support +- Fix html file location + * Sat Mar 14 2026 Arnaud G. GIBERT - 1.1.0-1rx3.mga9 - Create initial SPEC file for 1.1.0 on Mageia 9 diff --git a/etc/bash_completion.d/mpm b/etc/bash_completion.d/mpm new file mode 100644 index 0000000..dad3c34 --- /dev/null +++ b/etc/bash_completion.d/mpm @@ -0,0 +1,57 @@ +#!/bin/bash +#----------------------------------------------------------------------------------------------------------------------------------- +# +# MPM (Meta Package Manager) +# Copyright (C) 2024-2026 Arnaud G. GIBERT +# mailto:arnaud@rx3.net +# +# 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 2 +# of the License, or 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +#----------------------------------------------------------------------------------------------------------------------------------- +# -*- mode: shell; sh-basic-offset: 4; indent-tabs-mode: nil; -*- + +# Bash completion script for mpm command + + +_mpm_completion() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="--help -h --list -l --install -i" + + # If no option is provided yet, suggest all options + if [[ ${COMP_CWORD} == 1 ]]; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi + + # Handle option-specific completions + if [[ ${cur} == -* ]]; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi + + case "${prev}" in + --install|-i) + local mpm_names=$(mpm -l 2>/dev/null | awk 'NR>2 {gsub(/:$/, "", $1); print $1}') + COMPREPLY=( $(compgen -W "${mpm_names}" -- ${cur}) ) + return 0 + ;; + esac +} + +complete -F _mpm_completion mpm diff --git a/etc/mpm.conf b/etc/mpm.conf index 3a51c0e..dc505fa 100644 --- a/etc/mpm.conf +++ b/etc/mpm.conf @@ -1,9 +1,9 @@ -#-------------------------------------------------------------------------------# +#----------------------------------------------------------------------------------------------------------------------------------- # # MPM (Meta Package Manager) -# Copyright (C) 2024 Arnaud G. GIBERT +# Copyright (C) 2024-2026 Arnaud G. GIBERT # mailto:arnaud@rx3.net -# +# # 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 2 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -#------------------------------------------------------------------------------- +#----------------------------------------------------------------------------------------------------------------------------------- # Default MPM repository diff --git a/sbin/mpm b/sbin/mpm index cb0a33a..3289b8e 100755 --- a/sbin/mpm +++ b/sbin/mpm @@ -1,10 +1,10 @@ #!/bin/bash -#-------------------------------------------------------------------------------# +#----------------------------------------------------------------------------------------------------------------------------------- # # MPM (Meta Package Manager) # Copyright (C) 2024-2026 Arnaud G. GIBERT # mailto:arnaud@rx3.net -# +# # 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 2 @@ -19,7 +19,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -#------------------------------------------------------------------------------- +#----------------------------------------------------------------------------------------------------------------------------------- command="$1" arg="$2" @@ -33,13 +33,12 @@ else MPM_REPO="https://www.rx3.net/mpm-repository" fi -VERSION=1.1.0 +VERSION=1.1.1 -#----------------------------------------------------------------------------------------------------------------------------------- # Exec CMD #----------------------------------------------------------------------------------------------------------------------------------- @@ -63,8 +62,7 @@ exec_cmd() -#----------------------------------------------------------------------------------------------------------------------------------- -# MPM Help +# MPM Version Print #----------------------------------------------------------------------------------------------------------------------------------- function mpm_version_print() @@ -76,7 +74,6 @@ function mpm_version_print() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Help #----------------------------------------------------------------------------------------------------------------------------------- @@ -91,7 +88,6 @@ function mpm_help_print() -#----------------------------------------------------------------------------------------------------------------------------------- # Arg Parse #----------------------------------------------------------------------------------------------------------------------------------- @@ -147,7 +143,6 @@ function mpm_args_parse() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Meta Package List #----------------------------------------------------------------------------------------------------------------------------------- @@ -165,7 +160,6 @@ function mpm_mpkg_list() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Meta Package Tag Read #----------------------------------------------------------------------------------------------------------------------------------- @@ -186,7 +180,6 @@ function mpm_mpkg_tag_read() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Meta Package Description #----------------------------------------------------------------------------------------------------------------------------------- @@ -201,7 +194,6 @@ function mpm_mpkg_desc() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Meta Package List #----------------------------------------------------------------------------------------------------------------------------------- @@ -216,7 +208,6 @@ function mpm_mpkg_pkglist() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM List #----------------------------------------------------------------------------------------------------------------------------------- @@ -238,7 +229,6 @@ function mpm_list() -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Install #----------------------------------------------------------------------------------------------------------------------------------- @@ -283,7 +273,6 @@ function mpm_install -#----------------------------------------------------------------------------------------------------------------------------------- # MPM Main #----------------------------------------------------------------------------------------------------------------------------------- diff --git a/var/www/mpm-repository/emacs-nox.mpm b/var/www/html/mpm-repository/emacs-nox.mpm similarity index 100% rename from var/www/mpm-repository/emacs-nox.mpm rename to var/www/html/mpm-repository/emacs-nox.mpm diff --git a/var/www/mpm-repository/emacs.mpm b/var/www/html/mpm-repository/emacs.mpm similarity index 100% rename from var/www/mpm-repository/emacs.mpm rename to var/www/html/mpm-repository/emacs.mpm diff --git a/var/www/mpm-repository/mariadb.mpm b/var/www/html/mpm-repository/mariadb.mpm similarity index 80% rename from var/www/mpm-repository/mariadb.mpm rename to var/www/html/mpm-repository/mariadb.mpm index fb80618..30ed980 100644 --- a/var/www/mpm-repository/mariadb.mpm +++ b/var/www/html/mpm-repository/mariadb.mpm @@ -1,3 +1,3 @@ -# +# MariaDB MPM PKG_DESC: MariaDB/MySQL Client PKG_LIST: mariadb-client diff --git a/var/www/mpm-repository/net_tools.mpm b/var/www/html/mpm-repository/net_tools.mpm similarity index 100% rename from var/www/mpm-repository/net_tools.mpm rename to var/www/html/mpm-repository/net_tools.mpm diff --git a/var/www/mpm-repository/postgres.mpm b/var/www/html/mpm-repository/postgres.mpm similarity index 75% rename from var/www/mpm-repository/postgres.mpm rename to var/www/html/mpm-repository/postgres.mpm index 1647eef..25930f6 100644 --- a/var/www/mpm-repository/postgres.mpm +++ b/var/www/html/mpm-repository/postgres.mpm @@ -1,3 +1,3 @@ -# +# PostgreSQL MPM PKG_DESC: PostgreSQL Client PKG_LIST: postgresql15