cryptodotis / irssi-otr

LibOTR functionality in Irssi.
GNU General Public License v2.0
183 stars 24 forks source link

./configure --prefix not working #53

Closed dt1973 closed 8 years ago

dt1973 commented 9 years ago

Expanding on https://github.com/cryptodotis/irssi-otr/issues/52 -- does anybody know why it's still trying to install parts into /usr/ despite specifying --prefix=$HOME --with-irssi-module-dir=$HOME/.irssi/modules --docdir=$HOME --infodir=$HOME --mandir=$HOME?

make[2]: Nothing to be done for `install-exec-am'.
/bin/mkdir -p '/usr/share/irssi/help'
/usr/bin/install -c -m 644 otr '/usr/share/irssi/help'
/usr/bin/install: cannot create regular file `/usr/share/irssi/help/otr': Permission denied
dt1973 commented 9 years ago

Note that ones --prefix dir must also be repeated in IRSSI_DIST in irssi-otr/src/Makefile.am for ./configure to work. Ideally the user shouldn't have to do this.

Rhialto commented 9 years ago

In pkgsrc, irssi is forced to install into its idea of $(prefix), typically /usr/pkg. For that purpose I have the following patches to match that:

$NetBSD$

Our irssi installs in $(prefix).

--- help/Makefile.am.orig       2015-07-19 16:12:13.000000000 +0000
+++ help/Makefile.am
@@ -1,6 +1,6 @@
 # The day Irssi will be able to check in $(prefix), this will change. Until
 # then, it's hardcoded.
-helpdir = /usr/share/irssi/help
+helpdir = $(prefix)/share/irssi/help
 help_DATA = otr

 EXTRA_DIST = otr
$NetBSD$

Our irssi installs in $(prefix).

--- src/Makefile.am.orig        2015-07-19 16:12:13.000000000 +0000
+++ src/Makefile.am
@@ -1,6 +1,6 @@
 AM_CFLAGS = $(LIBOTR_CFLAGS) $(LIBGCRYPT_CFLAGS) $(PACKAGE_FLAGS)

-IRSSI_DIST=/usr/include/irssi
+IRSSI_DIST=$(prefix)/include/irssi
 IRSSI_INCLUDE = -I$(IRSSI_DIST) \
                                -I$(IRSSI_DIST)/src \
                                -I$(IRSSI_DIST)/src/fe-common/core \
anarcat commented 8 years ago

this also affects multi-arch debian installs: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817172

patch incoming.