Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: mocore on August 11, 2015, 06:16:35 AM

Title: urlencode_build script
Post by: mocore on August 11, 2015, 06:16:35 AM
makefile for building gridsite urlencode 
* modified/updated version of https://github.com/2ion/urlencode

Code: [Select]
URL="http://raw.githubusercontent.com/CESNET/gridsite/gridsite-core_branch_2_0_5_cherry"
urlencode: get-source
gcc -02 -i ./interface src/urlencode.c src/grst_http.c -o urlencode

get-source:
install -m 0700 -d src
wget -Psrc $(URL)/src/urlencode.c
wget -Psrc $(URL)/src/grst_http.c
install -m 0700 -d interface
wget -Pinterface $(URL)/interface.c

clean:
-rm -rf src interface
-rm urlencode

build-deps
---
openssl-dev
linux- ${KERNEL} _api_headers.tcz
---
Title: Re: urlencode_build script
Post by: gerald_clark on August 11, 2015, 06:18:35 AM
And your question?
Title: Re: urlencode_build script
Post by: mocore on August 11, 2015, 06:31:42 AM
I was just posting the make file and build deps , so i dont forget/loose the info and just in case it was of any use/intrest to any one !

 I hope that is  no problem...  ( it should work but might have errors as it was a made by hand copy , idk if tab's will survive  )
I might get round to building a tcz and submiting it at some point , just not this one!
Title: Re: urlencode_build script
Post by: gerald_clark on August 11, 2015, 08:16:53 AM
Blogging is not allowed.
The script accomplishes nothing useful for Core.
Title: Re: urlencode_build script
Post by: mocore on August 11, 2015, 11:11:26 AM
Blogging is not allowed.
The script accomplishes nothing useful for Core.


It lets me build some bin i was missing in core ,
 any way the above had some errors so ..
 
This (hopfuly more useful) make script builds a tcz +  tcz.lst  and tcz.md5.txt 4core
Code: [Select]
URL="http://raw.githubusercontent.com/CESNET/gridsite/gridsite-core_branch_2_0_5_cherry"

mk-tcz: urlencode
mkdir -p /tmp/urlencode/usr/local/bin
cp ./urlencode /tmp/urlencode/usr/local/bin
mksquashfs urlencode urlencode.tcz
find /tmp/urlencode -not -type d   | cut -b 15- > urlencode.tcz.list
md5sum urlencode.tcz > urlencode.tcz.md5.txt

urlencode: get-source
gcc -O2 -I ./interface src/urlencode.c src/grst_http.c -o urlencode

get-source:
install -m 0700 -d src
[ -f ./src/urlencode.c ] || wget -Psrc $(URL)/src/urlencode.c
[ -f ./src/grst_http.c ] || wget -Psrc $(URL)/src/grst_http.c
install -m 0700 -d interface
[ -f ./interface/gridsite.h ] || wget -Pinterface $(URL)/interface/gridsite.h

clean:
-rm -rf  /tmp/urlencode
-rm urlencode urlencode.tcz urlencode.tcz.list urlencode.tcz.md5.txt
# -rm -rf src interface

Question's
Will the buildscripts/tree/ (http://git.tinycorelinux.net/index.cgi?url=buildscripts/)  ever contain any scripts ?
Could  this script  'usefull' enough to be included in it?
Title: Re: urlencode_build script
Post by: gerald_clark on August 11, 2015, 11:26:13 AM
Yes, building and submitting the tcz is the proper thing to do.
The build scripts are submitted with the tcz as described in the wiki.
They are not posted in the forum.