Browse Source
Harmonize the layout by having the first two lines of a package definition always be the homepage and the description.android-5
Fredrik Fornwall
7 years ago
15 changed files with 53 additions and 22 deletions
@ -1,7 +1,7 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://ccache.samba.org |
TERMUX_PKG_HOMEPAGE=https://ccache.samba.org |
||||
|
TERMUX_PKG_DESCRIPTION="Compiler cache for fast recompilation of C/C++ code" |
||||
TERMUX_PKG_VERSION=3.3.4 |
TERMUX_PKG_VERSION=3.3.4 |
||||
TERMUX_PKG_SRCURL=https://www.samba.org/ftp/ccache/ccache-$TERMUX_PKG_VERSION.tar.xz |
TERMUX_PKG_SRCURL=https://www.samba.org/ftp/ccache/ccache-$TERMUX_PKG_VERSION.tar.xz |
||||
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" |
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" |
||||
TERMUX_PKG_DESCRIPTION="Compiler cache for fast recompilation of C/C++ code" |
|
||||
TERMUX_PKG_SHA256=24f15bf389e38c41548c9c259532187774ec0cb9686c3497bbb75504c8dc404f |
TERMUX_PKG_SHA256=24f15bf389e38c41548c9c259532187774ec0cb9686c3497bbb75504c8dc404f |
||||
|
|
||||
|
@ -1,10 +1,7 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://wiki.gnome.org/Projects/Vala |
TERMUX_PKG_HOMEPAGE=https://wiki.gnome.org/Projects/Vala |
||||
_VALA_MAJOR=0 |
|
||||
_VALA_MINOR=36 |
|
||||
_VALA_PATCH=4 |
|
||||
TERMUX_PKG_VERSION=$_VALA_MAJOR.$_VALA_MINOR.$_VALA_PATCH |
|
||||
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" |
|
||||
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/vala/$_VALA_MAJOR.$_VALA_MINOR/vala-$TERMUX_PKG_VERSION.tar.xz |
|
||||
TERMUX_PKG_DESCRIPTION="C# like language for the GObject system" |
TERMUX_PKG_DESCRIPTION="C# like language for the GObject system" |
||||
|
TERMUX_PKG_VERSION=0.36.4 |
||||
|
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" |
||||
|
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/vala/${TERMUX_PKG_VERSION:0:4}/vala-$TERMUX_PKG_VERSION.tar.xz |
||||
TERMUX_PKG_DEPENDS="clang, glib-dev, pkg-config" |
TERMUX_PKG_DEPENDS="clang, glib-dev, pkg-config" |
||||
TERMUX_PKG_SHA256=e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059 |
TERMUX_PKG_SHA256=e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059 |
||||
|
@ -0,0 +1,33 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
|
||||
|
import os |
||||
|
import sys |
||||
|
|
||||
|
def main(): |
||||
|
package_dir = 'packages' |
||||
|
for pkgdir_name in sorted(os.listdir(package_dir)): |
||||
|
dir_path = package_dir + '/' + pkgdir_name |
||||
|
build_sh_path = dir_path + '/build.sh' |
||||
|
if not os.path.isfile(build_sh_path): |
||||
|
sys.exit('No build.sh file in: ' + pkgdir_name) |
||||
|
with open(build_sh_path) as build_sh: |
||||
|
lines = build_sh.readlines() |
||||
|
validate_package(pkgdir_name, lines) |
||||
|
|
||||
|
def validate_package(package_name, lines): |
||||
|
if len(lines) < 3: |
||||
|
print('Too few lines in package: ' + package_name) |
||||
|
return |
||||
|
if not lines[0].startswith('TERMUX_PKG_HOMEPAGE='): |
||||
|
print('The first line is not TERMUX_PKG_HOMEPAGE: ' + package_name) |
||||
|
if not lines[1].startswith('TERMUX_PKG_DESCRIPTION='): |
||||
|
print('The second line is not TERMUX_PKG_DESCRIPTION: ' + package_name) |
||||
|
|
||||
|
line_number = 1 |
||||
|
for line in lines: |
||||
|
if line.endswith(' \n'): |
||||
|
print('Line ' + str(line_number) + ' has trailing whitespace: ' + package_name) |
||||
|
line_number += 1 |
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
main() |
Loading…
Reference in new issue