Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-14 13:08:40 +0200
committerErich Eckner <git@eckner.net>2018-04-14 13:08:40 +0200
commit14649d9c2f14677952127a26dea086c0bd5acc3e (patch)
tree0259827054bc1895c02918867a7f943cb856a22c /packages/pkginfo.php
parent529b73bbd39bdf21afbc892204907c26948dc2b9 (diff)
packages/pkginfo.php: show links to package sources
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php60
1 files changed, 43 insertions, 17 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index cf89e9b..b618d6f 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -41,12 +41,17 @@
") AS `version`," .
"`repositories`.`stability` AS `repo_stability`," .
"`repositories`.`name` AS `repo`," .
- "`architectures`.`name` AS `arch`" .
+ "`architectures`.`name` AS `arch`," .
+ "`git_repositories`.`name` AS `git_repo`," .
+ "`package_sources`.`uses_upstream`," .
+ "`package_sources`.`uses_modification`" .
" FROM `binary_packages`" .
" JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" .
" JOIN `repositories` ON `binary_packages`.`repository`=`repositories`.`id`" .
" JOIN `build_assignments` ON `binary_packages`.`build_assignment`=`build_assignments`.`id`" .
" JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`" .
+ " JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id`" .
+ " JOIN `git_repositories` ON `upstream_repositories`.`git_repository`=`git_repositories`.`id`" .
" WHERE `binary_packages`.`pkgname`=from_base64(\"" . base64_encode($_GET["pkgname"]) . "\")" .
" AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["arch"]) . "\")" .
" AND `repositories`.`name`=from_base64(\"" . base64_encode($_GET["repo"]) . "\")"
@@ -237,17 +242,49 @@
<div id="actionlist">
<h4>Package Actions</h4>
<ul class="small">
-<!-- TODO
<li>
- <a href="https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/0ad" title="View source files for 0ad">Source Files</a> /
- <a href="https://projects.archlinux.org/svntogit/community.git/log/trunk?h=packages/0ad" title="View changes for 0ad">View Changes</a>
+<?php
+ if ($content["uses_upstream"]) {
+ print "<a href=\"https://projects.archlinux.org/svntogit/";
+ print $content["git_repo"];
+ print ".git/tree/trunk?h=packages/";
+ print $content["pkgbase"];
+ print "\" title=\"View upstream's source files for ";
+ print $content["pkgname"];
+ print "\">Upstream's Source Files</a> / ";
+ print "<a href=\"https://projects.archlinux.org/svntogit/";
+ print $content["git_repo"];
+ print ".git/log/trunk?h=packages/";
+ print $content["pkgbase"];
+ print "\" title=\"View upstream's changes for ";
+ print $content["pkgname"];
+ print "\">Upstream's Changes</a>";
+ if ($content["uses_modification"])
+ print "<br>\n";
+ }
+ if ($content["uses_modification"]) {
+ print "<a href=\"https://github.com/archlinux32/packages/tree/master/";
+ print $content["repo"];
+ print "/";
+ print $content["pkgbase"];
+ print "\" title=\"View archlinux32's source files for ";
+ print $content["pkgname"];
+ print "\">Archlinux32's Source Files</a> / ";
+ print "<a href=\"https://github.com/archlinux32/packages/commits/master/";
+ print $content["repo"];
+ print "/";
+ print $content["pkgbase"];
+ print "\" title=\"View upstream's changes for ";
+ print $content["pkgname"];
+ print "\">Archlinux32's Changes</a>";
+ }
+?>
</li>
+<!-- TODO
<li>
<a href="https://bugs.archlinux.org/?project=5&string=0ad" title="View existing bug tickets for 0ad">Bug Reports</a> /
<a href="https://bugs.archlinux.org/newtask?project=5&product_category=33&item_summary=%5B0ad%5D+PLEASE+ENTER+SUMMARY" title="Report new bug for 0ad">Add New Bug</a>
</li>
- <li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=0ad" title="Search wiki for 0ad">Search Wiki</a></li>
- <li><a href="https://security.archlinux.org/package/0ad" title="View security issues for 0ad">Security Issues</a></li>
<li><a href="flag/" title="Flag 0ad as out-of-date">Flag Package Out-of-Date</a>
<a href="/packages/flaghelp/"
@@ -390,17 +427,6 @@ if (count($elsewhere)>0) {
?>
</ul>
</div>
-
-<!-- <div id="pkgfiles" class="listing">
- <h3 title="Complete list of files contained within this package">
- Package Contents</h3>
- <div id="pkgfilelist">
- <p><a id="filelink" href="files/"
- title="Click to view the complete file list for 0ad">
- View the file list for 0ad</a></p>
- </div>
- </div>
- </div> -->
</div>