~fredg/NuTyX

859535f968ca6cc6db408f5c6819f911bbb01a12 — alienus 8 years ago 95f2ac5
Add kde template
1 files changed, 38 insertions(+), 9 deletions(-)

M pkgdir
M pkgdir => pkgdir +38 -9
@@ 1,5 1,5 @@
#!/bin/bash

#
# 
# pkgdir
#


@@ 25,11 25,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

#
# LICENSE: MIT
#

PKGDIR_VERSION=0.1
PKGDIR_VERSION=0.2

#
# ex: pkgdir -p plop@0.1


@@ 40,6 36,7 @@ print_help()
    echo "Usage: pkgdir [options] Dir"
    echo "Options:"
    echo "  -d,    --default        Install default Pkgfile & info in Dir"
    echo "  -k,    --kde            Install kde Pkgfile & info in Dir" 
    echo "  -p,    --perl           Install perl Pkgfile & info in Dir"
    echo "  -py,   --python         Install python Pkgfile & info in Dir"
    echo "  -w,    --waf            Install waf Pkgfile & info in Dir"


@@ 157,6 154,31 @@ EOF
    echo "$PORT/Pkgfile waf created"
}

# kde template
pkg_kde() 
{
    cat > $PKGNAME\@$PKGVERSION/Pkgfile << EOF
source=()

build() {
    cd \${_name}-\$version
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=\$KDE_PREFIX \
          -DCMAKE_BUILD_TYPE=Release \
          -Wno-dev .. \
    make
    make DESTDIR=\$PKG install
}



# NuTyX Pkgfile (http://nutyx.org)
EOF

    echo "$PORT/Pkgfile kde created"
}

#
# info template
#


@@ 189,12 211,15 @@ parse_options()
            -d|--default)
                DIR=$2
                DEFAULT=YES ;;
            -py|--python)
            -k|--kde)
                DIR=$2
                PYTHON=YES ;;
                KDE=YES ;;
            -p|--perl)
                DIR=$2
                PERL=YES ;;
            -py|--python)
                DIR=$2
                PYTHON=YES ;;
            -w|--waf)
                DIR=$2
                WAF=YES ;;


@@ 220,7 245,11 @@ main()
    if [ $DEFAULT ]; then
        check_dir
        pkg_default
        pkg_info    
        pkg_info
    elif [ $KDE ]; then
        check_dir
        pkg_kde
        pkg_info
    elif [ $PERL ]; then
        check_dir
        pkg_perl