3 #--- T2-COPYRIGHT-NOTE-BEGIN ---
4 #T2 SDE: scripts/Create-Pkg
5 #Copyright (C) 2004 - 2024 The T2 SDE Project
6 #Copyright (C) 1998 - 2003 ROCK Linux Project
8 #This Copyright note is generated by scripts/Create-CopyPatch,
9 #more information can be found in the files COPYING and README.
11 #This program is free software; you can redistribute it and/or modify
12 #it under the terms of the GNU General Public License version 2.
13 # --- T2-COPYRIGHT-NOTE-END ---
19 $0 [ package/repository/packagename ] url < url-2 ... >
27 info
= text
= url
= author
= category
= license
=GPL status
=Beta code
=
28 maintainer
='The T2 Project <t2@t2-project.org>'
33 dir
=${1#package/}; shift
43 dir
=${dir:-kde} category
=extra
/desktop
/kde author
="KDE Project"
44 code
=". \$base/package/*/*/kde-conf.in"
47 dir
=${dir:-gnome} category
=extra
/desktop
/gnome author
="GNOME Project"
48 code
=". \$base/package/*/*/gnome-conf.in"
51 curl
${1/github.com/api.github.com/repos} > repotmpfile
52 curl
${1/github.com/api.github.com/repos}/releases
> releasetmpfile
54 ver
=$
(jq
-r '.[0].tag_name' releasetmpfile
)
56 info
=$
(jq
-r .description repotmpfile
)
58 author
=$
(jq
-r .owner.login repotmpfile
)
59 license
=$
(jq
-r .license.spdx_id repotmpfile
)
61 [[ "$ver" != 0* ]] && status
=Stable
64 set -- "${url}/archive/${ver}/${url##*/}-${ver/v/}.tar.gz"
65 rm -f repotmpfile releasetmpfile
80 if [ "$pkg" = "$dir" ]; then
81 echo "Error: $dir must be <rep>/<pkg>!"
85 rep
="$(echo package/*/$pkg | cut -d'/' -f 2)"
86 if [ "$rep" != "*" ]; then
87 echo "Error: package $pkg belongs to $rep!"
92 confdir
="package/$dir"
94 echo -n "Creating $confdir ... "
95 if [ -e $confdir ]; then
96 echo "Error: $confdir already exists!"
99 if ! mkdir
-p $confdir; then
100 echo "Error: $confdir already exists!"
104 echo -n "Creating $pkg.desc ... "
105 cat >$confdir/$pkg.desc
<<EOT
121 [P] X -----5---9 400.000
127 " >> $confdir/$pkg.desc
130 echo "[D] 0 ${dl##*/} ${dl%/*}/" >> $confdir/$pkg.desc
133 touch $confdir/$pkg.cache
136 echo "Remember to fill in the TODO's:"
137 grep '^\[.\] $' $confdir/$pkg.desc
139 scripts
/Create-CopyPatch
$confdir/$pkg.desc |
patch -p1
141 scripts
/Config
-oldconfig
142 scripts
/Emerge-Pkg
$pkg