--- pyalpm/setup.py.orig	2021-06-06 11:16:43.786094800 +0200
+++ pyalpm/setup.py	2021-06-06 11:16:49.931474700 +0200
@@ -3,7 +3,7 @@
 from setuptools import setup, Extension
 
 import pkgconfig
-libalpm = pkgconfig.parse('libalpm')
+libalpm = pkgconfig.parse('libalpm', static=bool(os.getenv('LIBALPM_STATIC')))
 
 os.putenv('LC_CTYPE', 'en_US.UTF-8')
 
