You are not logged in.
I'm updating the optipng PKGBUILD for the AUR and am not quite grasping why the man file for it isn't being installed properly. The man page was just added in the latest version by the developer, and from what I can tell the <code>gcc.mak</code> file tries to install it properly in the <code>/usr/local/man/</code> directory. Here's the relevant portion of the make file:
prefix=/usr/local
mandir=${prefix}/man
man1dir=${mandir}/man1
install: $(OPTIPNG)
-@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
-@rm -f ${man1dir}/optipng.1
cp -p ../man/optipng.1 ${man1dir}
I also looked through the <code>makepkg</code> documentation, and it doesn't seem like that directory is one that automatically gets cleaned. Ideally it should end up in </code>/usr/man/man1/</code>, right? Will I have to copy it over myself, or am I missing something obvious? If you want my updated PKGBUILD that I've been messing with, here it is:
# Contributer: Aaron Schaefer <aaron>
pkgname=optipng
pkgver=0.5.1
pkgrel=1
pkgdesc="A PNG optimizer that recompresses image files to a smaller size, without losing any information"
url="http://optipng.sourceforge.net/"
license=""
depends=('glibc')
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('309239fb5f4dfa751f3b893bef58e316')
build() {
cd $startdir/src/$pkgname-$pkgver/src
make -f scripts/gcc.mak || return 1
install -D -m755 optipng $startdir/pkg/usr/bin/optipng
}
Offline
This seems to work fine:
# Contributer: Aaron Schaefer <aaron>
pkgname=optipng
pkgver=0.5.1
pkgrel=1
pkgdesc="A PNG optimizer that recompresses image files to a smaller size, without losing any information"
url="http://optipng.sourceforge.net/"
license=""
depends=('glibc')
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('309239fb5f4dfa751f3b893bef58e316')
build() {
cd $startdir/src/$pkgname-$pkgver/src
make -f scripts/gcc.mak prefix=/usr || return 1
make -f scripts/gcc.mak prefix=$startdir/pkg/usr install || return 1
#install -D -m755 optipng $startdir/pkg/usr/bin/optipng
}
The makefile has code to install the binary too, so I commented out the install line on the bottom. Just make sure to set the prefix to $startdir/pkg/usr when installing so that it properly puts stuff in the pkg folder.
Offline
Looks like Cerebral beat me to the punch
Offline
So I can understand this...why did you run the make file twice? Did you mean to leave in the line where it sets the prefix to just /usr? Admittedly I'm learning here, thanks for your patience...
Offline
The first time I run the makefile is to build the app, I set prefix=/usr there in case it's needed anywhere in the real code to know where it's eventually being installed.
The second time, I actually run make install, which actually runs the install target you pointed to in the makefile - this target isn't called automatically.
Offline
Ahhhh...I'm a little slow. :oops: I didn't see the install part there. Thanks for the hand-holding on this one...I'm finally starting to get how make files work!
Offline
Heh, not a problem. I still balk at some of the really complicated makefiles out there from time to time - they can get pretty crazy, especially when ./configure is involved.
Offline