You are not logged in.

#1 2013-04-19 23:43:19

ant32
Member
Registered: 2013-03-23
Posts: 24

mingw32-quazip-qt4 PKGBUILD Missing Anything?

I just started compiling some of my windows packages from linux and needed quazip so I created a package for it.

# Maintainer: ant32 <antreimer@gmail.com>

pkgname=mingw32-quazip-qt4
pkgver=0.5.1
pkgrel=1
pkgdesc="C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package (mingw32)"
url="http://sourceforge.net/projects/quazip/"
arch=('any')
depends=('mingw32-runtime' 'mingw32-qt4')
makedepends=('mingw32-gcc')
source=("http://downloads.sourceforge.net/project/quazip/quazip/$pkgver/quazip-$pkgver.tar.gz")
options=('!strip' '!buildflags')
license=('LGPL')
md5sums=('eec6b9b6f19654230dfcd158f29ea9d0')

build() {
  unset LDFLAGS
  cd "$srcdir/quazip-$pkgver/quazip"
  qmake-qt4-mingw32 PREFIX="$pkgdir/usr/i486-mingw32" CONFIG+=staticlib CONFIG+=dll LIBS+=-lz
  make
  #make staticlib
}

package() {
  cd "$srcdir/quazip-$pkgver/quazip"
  
  mkdir -p ${pkgdir}/usr/i486-mingw32/{lib,include}
  make install
  i486-mingw32-strip -x ${pkgdir}/usr/i486-mingw32/lib/*.dll
  i486-mingw32-strip -g ${pkgdir}/usr/i486-mingw32/lib/libquazip.a
  chmod 644 ${pkgdir}/usr/i486-mingw32/lib/libquazip.a
  i486-mingw32-ranlib ${pkgdir}/usr/i486-mingw32/lib/libquazip.a
  #install -Dm644 ../FindQuaZip.cmake "$pkgdir/usr/i486-mingw32/share/apps/cmake/modules/FindQuaZip.cmake"
}

Offline

#2 2013-04-22 17:42:30

ant32
Member
Registered: 2013-03-23
Posts: 24

Re: mingw32-quazip-qt4 PKGBUILD Missing Anything?

I also now built a pkgbuild for mingw32 postgresql-libs and libmariadbclient. After researching a couple hours I could not find that there was any way to successfully build mysql client libraries with mingw32. I also didn't find a way to extract the def file without using wine.

mingw32-libmariadbclient

# Maintainer: Philip A Reimer <antreimer@gmail.com>
pkgname=mingw32-libmariadbclient
pkgver=5.5.30
pkgrel=1
pkgdesc="MariaDB client libraries (mingw32)"
arch=('any')
url="http:/mariadb.org"
license=('GPL')
makedepends=('mingw32-gcc' 'wine')
depends=('mingw32-runtime')
options=('!strip' '!buildflags')
source=("http://ftp.osuosl.org/pub/mariadb/mariadb-${pkgver}/win32-packages/mariadb-${pkgver}-win32.zip"
	"http://pub.ist.ac.at/~schloegl/software/reimp-0.50.zip")
#http://lists.gnu.org/archive/html/mingw-cross-env-list/2010-11/msg00101.html
md5sums=('1c128812357d633908c4b52a497de8bc'
	 '7794bf911905c2c5aefe3cc0dc956848')

build() {
  cd "${srcdir}/reimp"
  unset LDFLAGS
  i486-mingw32-gcc -g -I . reimp.c util.c ar.c -o reimp.exe
  cd "${srcdir}/mariadb-${pkgver}-win32/lib"
  wine ${srcdir}/reimp/reimp.exe -d libmysql.lib
  /usr/i486-mingw32/bin/dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
}

package() {
  cd "${srcdir}/mariadb-${pkgver}-win32"
  mkdir -p "${pkgdir}"/usr/i486-mingw32/{include,lib}
  cp -R include "${pkgdir}"/usr/i486-mingw32
  install -Dm644 lib/libmysql.dll "${pkgdir}"/usr/i486-mingw32/lib/libmysql.dll
  install -Dm644 lib/libmysql.a "${pkgdir}"/usr/i486-mingw32/lib/libmysql.a
}

mingw32-postgresql-libs

# Maintainer: Philip A Reimer <antreimer@gmail.com>

pkgname=mingw32-postgresql-libs
pkgver=9.2.4
pkgrel=1
pkgdesc="Libraries for use with PostgreSQL (mingw32)"
arch=('any')
url="http://www.postgresql.org/"
license=('custom:PostgreSQL')
depends=('mingw32-runtime')
#depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0')
makedepends=('mingw32-gcc')
source=(http://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
options=('!strip' '!buildflags')
md5sums=('6ee5bb53b97da7c6ad9cb0825d3300dd')

build() {
  cd "${srcdir}/postgresql-${pkgver}"
  ./configure --host=i486-mingw32 --prefix=/usr/i486-mingw32
}

package() {
  cd "${srcdir}/postgresql-${pkgver}"

  # install libs
  for dir in src/interfaces src/bin/pg_config src/bin/psql; do
    make -C ${dir} DESTDIR="${pkgdir}" install
  done

  cd src/include

  mkdir -p "${pkgdir}"/usr/i486-mingw32/include/{libpq,postgresql/internal/libpq}

  # these headers are needed by the public headers of the interfaces
  install -m644 pg_config.h "${pkgdir}/usr/i486-mingw32/include/"
  install -m644 pg_config_os.h "${pkgdir}/usr/i486-mingw32/include/"
  install -m644 postgres_ext.h "${pkgdir}/usr/i486-mingw32/include/"
  install -m644 libpq/libpq-fs.h "${pkgdir}/usr/i486-mingw32/include/libpq/"
  install -m644 pg_config_manual.h "${pkgdir}/usr/i486-mingw32/include/"

  # these headers are needed by the not-so-public headers of the interfaces
  install -m644 c.h "${pkgdir}/usr/i486-mingw32/include/postgresql/internal/"
  install -m644 port.h "${pkgdir}/usr/i486-mingw32/include/postgresql/internal/"
  install -m644 postgres_fe.h "${pkgdir}/usr/i486-mingw32/include/postgresql/internal/"
  install -m644 libpq/pqcomm.h "${pkgdir}/usr/i486-mingw32/include/postgresql/internal/libpq/"
}

Offline

#3 2013-04-24 21:01:48

ant32
Member
Registered: 2013-03-23
Posts: 24

Re: mingw32-quazip-qt4 PKGBUILD Missing Anything?

I uploaded these packages to the AUR

Offline

#4 2013-04-25 08:19:39

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: mingw32-quazip-qt4 PKGBUILD Missing Anything?

Overall the pacakges look ok, but i have a question :

Why are you installing to /usr/i486-mingw32/  ?
normally this would be something like /usr/share/i486-mingw32 , or maybe /opt/i486-mingw32 .

Last edited by Lone_Wolf (2013-04-25 08:19:58)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2013-04-25 14:43:28

ant32
Member
Registered: 2013-03-23
Posts: 24

Re: mingw32-quazip-qt4 PKGBUILD Missing Anything?

It says in https://wiki.archlinux.org/index.php/Mi … guidelines
"always put all stuff under the /usr/i486-mingw32 prefix"
and later
"As mentioned above, the files should all be installed into /usr/i486-mingw32. Specifically, all .dll files should be put into /usr/i486-mingw32/bin as they are dynamic libraries needed at runtime. Their corresponding .dll.a files should go into /usr/i486-mingw32/lib."
Am I missing something?

Offline

#6 2013-04-26 09:14:57

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: mingw32-quazip-qt4 PKGBUILD Missing Anything?

Using folders directly under /usr is frowned upon,
but that wiki page and the mingw32-gcc pacakge in community repo state that's the way things need to be done.

Your packages are consistent with those, so they are fine.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB