summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMayorBender2019-06-22 10:14:03 -0400
committerMayorBender2019-06-22 10:16:42 -0400
commitd43b385bcd2a5009bd6b27b86f7efc5615d2aba3 (patch)
tree92cd097f679f98581443f7117a436a85eaabedbe
parent2ac15d21cefda12b5a3d1254d23b630dfe3d5c0e (diff)
downloadaur-d43b385bcd2a5009bd6b27b86f7efc5615d2aba3.tar.gz
v9.0.1.r0.g3d83ff0
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore1
-rw-r--r--Makefile.patch13
-rw-r--r--PKGBUILD54
4 files changed, 49 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b241c2a94f1f..6d9d7906c6da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = libcs50-git
- pkgdesc = CS50 Library for C
- pkgver = 8.1.0.r0.gafba85d
+ pkgdesc = CS50 Library for C (development version)
+ pkgver = 9.0.1.r0.g3d83ff0
pkgrel = 1
- url = https://cs50.harvard.edu/
+ url = https://github.com/cs50/libcs50
arch = x86_64
arch = i686
groups = cs50
- license = unknown
+ license = MIT
makedepends = asciidoctor
makedepends = git
provides = libcs50
conflicts = libcs50
source = git+https://github.com/cs50/libcs50.git#branch=master
+ source = Makefile.patch
sha256sums = SKIP
+ sha256sums = 4a10efd4f4f6b6bb18152a4f28497f7f8562aaa5aaf50c401d308827b922ef3f
pkgname = libcs50-git
diff --git a/.gitignore b/.gitignore
index 9865d22ba8ed..009a69074476 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
!.gitignore
!PKGBUILD
!.SRCINFO
+!Makefile.patch
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 000000000000..cd1c8548a726
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -46,10 +46,6 @@
+ cp -r $(filter-out deb, $(wildcard build/*)) $(DESTDIR)
+ cp -r $(MANS) $(DESTDIR)/$(MANDIR)
+
+-ifeq ($(OS),Linux)
+- ldconfig $(DESTDIR)/lib
+-endif
+-
+ .PHONY: clean
+ clean:
+ rm -rf build
diff --git a/PKGBUILD b/PKGBUILD
index c36510ea94fd..4c931b9cfc42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,58 @@
-# Maintainer: Dan Beste <dan.ray.beste@gmail.com>
+# Maintainer: MayorBender <7480812+kingy9000@users.noreply.github.com>
+# Contributor: Dan Beste <dan.ray.beste@gmail.com>
+# Contributor: Justine Paul <jestine-paul@dsi.a-star.edu.sg>
pkgname='libcs50-git'
_gitname='libcs50'
-pkgver=8.1.0.r0.gafba85d
+pkgver=9.0.1.r0.g3d83ff0
pkgrel=1
-pkgdesc="CS50 Library for C"
+pkgdesc="CS50 Library for C (development version)"
arch=('x86_64' 'i686')
-url="https://cs50.harvard.edu/"
-license=('unknown')
+url="https://github.com/cs50/libcs50"
+license=('MIT')
groups=('cs50')
makedepends=('asciidoctor' 'git')
provides=("${_gitname}")
conflicts=("${_gitname}")
-source=('git+https://github.com/cs50/libcs50.git#branch=master')
-sha256sums=('SKIP')
+source=(
+ 'git+https://github.com/cs50/libcs50.git#branch=master'
+ 'Makefile.patch'
+)
+sha256sums=(
+ 'SKIP'
+ '4a10efd4f4f6b6bb18152a4f28497f7f8562aaa5aaf50c401d308827b922ef3f'
+)
pkgver() {
cd "${_gitname}"
- git describe --tags --long \
- | sed 's/\([^-]*-g\)/r\1/;s/-/./g' \
- | sed 's/v//'
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
-_query_jobs() {
- echo "${MAKEFLAGS}" \
- | grep -Eo "\-j.?[0-9]+"
-}
+prepare() {
+ cd "${_gitname}"
-_set_jobs() {
- echo $MAKEFLAGS \
- | sed "s/$(_query_jobs)/-j 1/"
+ patch < "${srcdir}/Makefile.patch"
}
build() {
cd "${_gitname}"
-
- # Override makeflags:
- local MAKEFLAGS=$(_set_jobs)
- make
+ # TODO: Get this fixed upstream. We should not have to unset our $CFLAGS and
+ # $MAKEFLAGS.
+ CFLAGS= MAKEFLAGS= make
}
package() {
cd "${_gitname}"
- install -d "${pkgdir}/usr"
- install -d "${pkgdir}/usr/share/man/man3"
- cp -rp build/* "${pkgdir}/usr/"
- cp -rp debian/docs/* "${pkgdir}/usr/share/man/man3/"
+ # TODO: Get this fixed upstream. We should not have to unset our $CFLAGS and
+ # $MAKEFLAGS.
+ CFLAGS= MAKEFLAGS= DESTDIR="${pkgdir}/usr" make install
+
+ rm "${pkgdir}/usr/src/cs50.c"
+ install -d -m 755 "${pkgdir}/usr/src/libcs50"
+ install -m 644 src/cs50.c src/cs50.h -t "${pkgdir}/usr/src/libcs50"
}
# vim: ts=2 sw=2 et: