diff options
author | EuAndreh <eu@euandre.org> | 2023-03-29 11:33:35 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-29 11:33:35 -0300 |
commit | 805a954f40e943e74123def29897be53bce318ea (patch) | |
tree | 7e39bd8e16eb5189e516d5a57696e74f2b207c79 | |
parent | src/bin/paku.in: Generate build.nix (diff) | |
download | package-repository-805a954f40e943e74123def29897be53bce318ea.tar.gz package-repository-805a954f40e943e74123def29897be53bce318ea.tar.xz |
paku.lock: Separate "version" and "vversion"
-rw-r--r-- | paku.lock | 15 | ||||
-rwxr-xr-x | src/bin/paku.in | 35 |
2 files changed, 27 insertions, 23 deletions
@@ -33,7 +33,8 @@ "license": "AGPL-3.0-or-later", "native-inputs": [], "inputs": [], - "version": "v0.1.0", + "version": "0.1.0", + "vversion": "v0.1.0", "date": "2021-06-13", "label": "0-1-0", "sha256": "252c98e349fed8df180ace540675b69a811ff56a9f06fa505eb475e047648a1f", @@ -62,7 +63,8 @@ "license": "AGPL-3.0-or-later", "native-inputs": [], "inputs": [], - "version": "v0.2.0", + "version": "0.2.0", + "vversion": "v0.2.0", "date": "2021-06-19", "label": "0-2-0", "sha256": "9ea6562812f6127771bc2b86919ea63056fcc0f5c1e556875855c924ee8b1183", @@ -91,7 +93,8 @@ "license": "AGPL-3.0-or-later", "native-inputs": [], "inputs": [], - "version": "v0.1.2", + "version": "0.1.2", + "vversion": "v0.1.2", "date": "2021-01-26", "label": "0-1-2", "sha256": "bbf0fd451d3de3b09a01cfbcc74482741463f9d8ac73ba6024e538c203b1dfeb", @@ -120,7 +123,8 @@ "license": "AGPL-3.0-or-later", "native-inputs": [], "inputs": [], - "version": "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", + "version": "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", + "vversion": "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", "date": "2022-03-27", "label": "latest", "sha256": "a25561ae8062788bfb79df2de5f26e5f1100638fbeabff934490cdf0a9dde105", @@ -160,7 +164,8 @@ "guile" ], "type": "latest", - "version": "065435cdce609604e33b879b9be3e81ab89f3e7b", + "version": "065435cdce609604e33b879b9be3e81ab89f3e7b", + "vversion": "065435cdce609604e33b879b9be3e81ab89f3e7b", "date": "2022-11-16", "label": "latest", "sha256": "4d6e5171f36d48ab2341cc9e3346262f9ec7c9f0fd3d88ec6e204ef2160821f8", diff --git a/src/bin/paku.in b/src/bin/paku.in index 8dc30c9..72f901d 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -245,7 +245,7 @@ sub emit_nix() { print <<~EOF; $pkg->{name}$suffix = pkgs.stdenv.mkDerivation rec { name = "$pkg->{name}"; - version = "$pkg->{version}"; + version = "$pkg->{vversion}"; src = fetchTarball { url = @@ -326,7 +326,6 @@ sub emit_guix() { for my $pkg (@{$json->{packages}}) { my $long = $pkg->{'long-description'}; $long =~ s/^(.)/ $1/gm; - my $ver = $pkg->{version} =~ s/^v//r; my $license = license_for 'guix', $license_mapping, $pkg->{license}; my $name = $pkg->{name} . ( @@ -337,7 +336,7 @@ sub emit_guix() { (define-public $name (package (name "$pkg->{name}") - (version "$ver") + (version "$pkg->{version}") (source (origin (method url-fetch) @@ -407,7 +406,7 @@ sub emit_debian() { wget -O \$\@ \\ '$pkg->{url}' - \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{version}: \$(DIR)/debian/tarballs/$pkg->{fname} + \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{vversion}: \$(DIR)/debian/tarballs/$pkg->{fname} mkdir -p \$(\@D) tar -C \$(\@D) -xf \$(DIR)/debian/tarballs/$pkg->{fname} touch \$\@ @@ -419,26 +418,26 @@ sub emit_debian() { my $deb_name = "$pkg->{name}_" . ( - $pkg->{label} eq 'latest' ? 'latest' : $pkg->{version} + $pkg->{label} eq 'latest' ? 'latest' : $pkg->{vversion} ) . "_all.deb"; my $deb_path = "\$(DIR)/debian/public/$deb_name"; push @debs, "\t$deb_path \\\n"; - my $ver = $pkg->{label} eq 'latest' ? '0.' . $pkg->{version} . '.latest' : $pkg->{version}; + my $ver = $pkg->{label} eq 'latest' ? '0.' . $pkg->{vversion} . '.latest' : $pkg->{vversion}; $ver =~ s/^v//; push @targets, <<~EOF; - \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}/DEBIAN: \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{version} + \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}/DEBIAN: \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{vversion} \$(MAKE) \\ - -C \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{version} \\ + -C \$(DIR)/debian/builddirs/$pkg->{name}-$pkg->{vversion} \\ install \\ PREFIX=/usr \\ DESTDIR="\$\$PWD"/\$(\@D) mkdir -p \$\@ touch \$\@ - \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}/DEBIAN/control: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}/DEBIAN + \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}/DEBIAN/control: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}/DEBIAN printf '' > \$\@ printf 'Package: $pkg->{name}\\n' >> \$\@ printf 'Version: $ver\\n' >> \$\@ @@ -462,12 +461,12 @@ sub emit_debian() { sed 's|^| |' >> \$\@ printf '\\n' >> \$\@ - \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}.deb: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}/DEBIAN/control - dpkg-deb --build \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version} + \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}.deb: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}/DEBIAN/control + dpkg-deb --build \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion} - $deb_path: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}.deb + $deb_path: \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}.deb mkdir -p \$(\@D) - cp \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{version}.deb \$\@ + cp \$(DIR)/debian/destdirs/$pkg->{name}-$pkg->{vversion}.deb \$\@ EOF @@ -527,7 +526,7 @@ sub emit_alpine() { } my $date = $pkg->{date} =~ s/-//gr; - my $ver = $pkg->{label} eq 'latest' ? "0.0.1_git$date" : $pkg->{version}; + my $ver = $pkg->{label} eq 'latest' ? "0.0.1_git$date" : $pkg->{vversion}; my $dir = "$d/$pkg->{name}" . ( $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}" ); @@ -550,7 +549,7 @@ sub emit_alpine() { source='$pkg->{url}' pkgbasedir="\$startdir/.abuild/pkg" srcdir="\$startdir/.abuild/src" - builddir="\$srcdir/$pkg->{name}-$pkg->{version}" + builddir="\$srcdir/$pkg->{name}-$pkg->{vversion}" build() { make PREFIX=/usr @@ -581,7 +580,7 @@ sub emit_alpine() { next if $pkg->{architectures} ne 'any'; my $date = $pkg->{date} =~ s/-//gr; - my $ver = $pkg->{label} eq 'latest' ? "0.0.1_git$date" : $pkg->{version}; + my $ver = $pkg->{label} eq 'latest' ? "0.0.1_git$date" : $pkg->{vversion}; my $recipe_dir = "src/alpine/$pkg->{name}" . ( $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}" @@ -740,9 +739,9 @@ sub emit_html() { my $suffix = $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}"; my $apt_suffix = $suffix =~ s/-/=/r; my $id = $pkg->{name} . ( - $pkg->{label} eq 'latest' ? '' : "-$pkg->{version}" + $pkg->{label} eq 'latest' ? '' : "-$pkg->{vversion}" ); - my $label = $pkg->{label} eq 'latest' ? 'latest' : $pkg->{version}; + my $label = $pkg->{label} eq 'latest' ? 'latest' : $pkg->{vversion}; print <<~EOF; <li id="$id"> <details> |