summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Angel Useche Castro2018-01-15 00:08:17 -0400
committerMiguel Angel Useche Castro2018-01-15 00:08:17 -0400
commitea2f8ba700821dd8df4b5284ecde578b155413f3 (patch)
treed1836253b3efd9c724a6d30d7b697cb97aa7a50d
parent153ce020ed9f924dd02b4893d67b4aa08cc97bd5 (diff)
downloadaur-ea2f8ba700821dd8df4b5284ecde578b155413f3.tar.gz
Updating package to include Fedora's patches
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore5
-rwxr-xr-xPKGBUILD37
3 files changed, 43 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b82a595ecf8e..97c106ae399e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dcmtk
pkgdesc = A collection of libraries and applications implementing large parts the DICOM standard
pkgver = 3.6.2
- pkgrel = 0
+ pkgrel = 1
url = http://dicom.offis.de/dcmtk
arch = i686
arch = x86_64
@@ -15,9 +15,12 @@ pkgbase = dcmtk
depends = openssl
depends = charls
depends = libssh
+ noextract = dcmtk-3.6.2-1.fc28.src.rpm
options = !buildflags
source = ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk362/dcmtk-3.6.2.tar.gz
+ source = http://kojipkgs.fedoraproject.org/packages/dcmtk/3.6.2/1.fc28/src/dcmtk-3.6.2-1.fc28.src.rpm
sha512sums = a3190287b068ae17984909dd9e8d920ddea3b590fc3888c42fc33fca4a3cdcf7dcc9bd64d994620303eef7c7ab7b4184ac21ebd1167ae2c17e4a88f641d7ef94
+ sha512sums = 403b844a003c90afa696e4739fd687f0ea2ce8dd76e473c384738ab4190857ba39ea553e6eeaff39b8b2ddfe420aae1c131a14f7c622f34a2f6863f142cc1382
pkgname = dcmtk
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..039de2a30ba9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+*.rpm
+*.tar.gz
+*.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
index d7677eb35b33..c233f369df71 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,23 +7,54 @@
pkgname=dcmtk
pkgver=3.6.2
-pkgrel=0
+# Fedora release (from Koji)
+_fedora_rel=1.fc28
+# Newer Fedora releases in the future can be found at http://koji.fedoraproject.org/
+
+pkgrel=1
pkgdesc="A collection of libraries and applications implementing large parts the DICOM standard"
arch=('i686' 'x86_64')
url="http://dicom.offis.de/dcmtk"
license=('other')
depends=('zlib' 'libpng' 'libtiff' 'libxml2' 'openssl' 'charls' 'libssh')
makedepends=('cmake' 'make')
-source=("ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk362/${pkgname}-${pkgver}.tar.gz")
-sha512sums=('a3190287b068ae17984909dd9e8d920ddea3b590fc3888c42fc33fca4a3cdcf7dcc9bd64d994620303eef7c7ab7b4184ac21ebd1167ae2c17e4a88f641d7ef94')
+source=("ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk362/${pkgname}-${pkgver}.tar.gz" "http://kojipkgs.fedoraproject.org/packages/dcmtk/${pkgver}/${_fedora_rel}/src/${pkgname}-${pkgver}-${_fedora_rel}.src.rpm")
+noextract=("${pkgname}-${pkgver}-${_fedora_rel}.src.rpm")
+sha512sums=('a3190287b068ae17984909dd9e8d920ddea3b590fc3888c42fc33fca4a3cdcf7dcc9bd64d994620303eef7c7ab7b4184ac21ebd1167ae2c17e4a88f641d7ef94' '403b844a003c90afa696e4739fd687f0ea2ce8dd76e473c384738ab4190857ba39ea553e6eeaff39b8b2ddfe420aae1c131a14f7c622f34a2f6863f142cc1382')
#Currently it's not building otherwise
options=(!buildflags)
build() {
cd "${srcdir}"
+ # Extract RPM into another directory
+ if [ ! -d fedora ]; then
+ mkdir fedora
+ fi
+
+ pushd fedora
+ bsdtar -xf "../${pkgname}-${pkgver}-${_fedora_rel}.src.rpm"
+ popd
+
+ sum_original=`sha512sum "${srcdir}/fedora/${pkgname}-${pkgver}.tar.gz" | awk '{print $1}'`
+ sum_fedora=`sha512sum "${srcdir}/${pkgname}-${pkgver}.tar.gz" | awk '{print $1}'`
+
+ # Verify the authenticity of both the Fedora source and the upstream source
+ if [[ $sum_fedora != $sum_original ]]; then
+ error "sha512 sums of Fedora's source and upstream source do not match!"
+ exit
+ fi
+
cd "${pkgname}-${pkgver}"
+ # Apply Fedora patches (fixes build)
+ for i in $(cat "${srcdir}/fedora/${pkgname}.spec" | grep "Patch[0-9]*:" | awk '{print $2}'); do
+ patch -p1 -i "${srcdir}/fedora/${i}"
+ done
+
+ # Remove bundled charls
+ rm -rf dcmjpls/libcharls/
+
# Fix linker flags
export LDFLAGS="-lssh -lz ${LDFLAGS}"