Permalink
Browse files

Fix bugs in creating rpm and arch packages

  • Loading branch information...
1 parent fd68dff commit 2afe9c0ad264fcf1709075d333395ac3c2d0af78 @ThomasFunk ThomasFunk committed Dec 30, 2012
Showing with 123 additions and 12 deletions.
  1. +18 −11 Makefile
  2. +1 −1 arch/PKGBUILD_FNS
  3. +104 −0 arch/makepkg.conf
View
@@ -1,26 +1,30 @@
#-----------------------------------------------------------------------
# File: Makefile
-# Version: 1.0.6
+# Version: 1.0.7
# Licence: GPL 2
#
# Description: Makefile to install, uninstall Fvwm-Nightshade and create
# a dist package
#
# Author: Thomas Funk <t.funk@web.de>
# Created: 09/08/2012
-# Changed: 12/27/2012
+# Changed: 12/30/2012
#-----------------------------------------------------------------------
package = fvwm-nightshade
version = $(shell grep ns_version fvwm-nightshade/config |sed q |cut -d' ' -f3)
tarname = $(package)
distdir = ../$(tarname)-$(version)
pkgdir = ../$(package)
+arch: pkgdir = /tmp/$(package)
+rpm: srcdir = $(shell rpmbuild --showrc |grep " _topdir" |cut -f2)/SOURCES
DESTDIR ?=
deb: DESTDIR = $(pkgdir)
+
prefix ?= /usr/local
deb: prefix = /usr
+
pkgprefix = $(DESTDIR)$(prefix)
bindir = $(pkgprefix)/bin
datadir = $(pkgprefix)/share
@@ -157,27 +161,30 @@ deb: build-deb install
prepare-rpm:
sed -i "s/Version:.*/Version:\t$(version)/" rpm/fvwm-nightshade.spec
+ cp $(distdir).tar.gz $(srcdir)
-rpm: prepare-rpm dist
+rpm: dist prepare-rpm
echo "Build rpm package"
rpmbuild -bb rpm/fvwm-nightshade.spec --clean
prepare-arch: dist
echo "Build Arch package"
rm -rf $(pkgdir)
- mkdir -p $(pkgdir)/src/$(tarname)-$(version)
- cp -rf * $(pkgdir)/src/$(tarname)-$(version)/
+ mkdir -p $(pkgdir)
cp arch/PKGBUILD_FNS $(pkgdir)/PKGBUILD
+ mv $(distdir).tar.gz $(pkgdir)/
sed -i "s/pkgver=.*/pkgver=$(version)/" $(pkgdir)/PKGBUILD
- sed -i "s#source=.*#source=\"$(distdir).tar.gz\"#" $(pkgdir)/PKGBUILD
+ sed -i "s#source=.*#source=\"$(package)-$(version).tar.gz\"#" $(pkgdir)/PKGBUILD
sed -i "s#^ cd \"\$$srcdir/.*# cd \"\$$srcdir/$(package)-$(version)\"#" $(pkgdir)/PKGBUILD
arch: prepare-arch
- cd $(pkgdir)
- makepkg -g >> PKGBUILD
- makepkg
+ makepkg --config arch/makepkg.conf -p $(pkgdir)/PKGBUILD -g >> $(pkgdir)/PKGBUILD
+ makepkg --config arch/makepkg.conf -p $(pkgdir)/PKGBUILD
+ rm -f *.xz
+ mv $(pkgdir)/*.xz ../
+ rm -rf $(pkgdir)
-.PHONY: FORCE dist distcheck install uninstall deb arch
-.SILENT: install uninstall build-deb deb rpm prepare-rpm arch prepare-arch
+.PHONY: dist distcheck install uninstall deb rpm arch
+.SILENT: FORCE dist install uninstall build-deb deb rpm prepare-rpm arch prepare-arch
View
@@ -6,7 +6,7 @@ pkgname=Fvwm-Nightshade
pkgver=
pkgrel=1
pkgdesc="A lightweight but feature rich and good looking configuration of Fvwm."
-arch=('i686' 'x86_64')
+arch=('any')
url="https://github.com/Fvwm-Nightshade"
license=('GPL')
depends=('fvwm-cvs>=2.6.6' 'pyxdg' 'conky' 'xscreensaver' 'eterm' 'imagemagick' 'librsvg' 'stalonetray' 'cpufreqd' 'xorg-xwd' 'gksu')
View
@@ -0,0 +1,104 @@
+#
+# /etc/makepkg.conf
+#
+
+#########################################################################
+# SOURCE ACQUISITION
+#########################################################################
+#
+#-- The download utilities that makepkg should use to acquire sources
+# Format: 'protocol::agent'
+DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
+ 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
+ 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
+ 'rsync::/usr/bin/rsync -z %u %o'
+ 'scp::/usr/bin/scp -C %u %o')
+
+# Other common tools:
+# /usr/bin/snarf
+# /usr/bin/lftpget -c
+# /usr/bin/wget
+
+#########################################################################
+# ARCHITECTURE
+#########################################################################
+#
+CARCH="any"
+
+
+#########################################################################
+# BUILD ENVIRONMENT
+#########################################################################
+#
+# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign)
+# A negated environment option will do the opposite of the comments below.
+#
+#-- fakeroot: Allow building packages as a non-root user
+#-- distcc: Use the Distributed C/C++/ObjC compiler
+#-- color: Colorize output messages
+#-- ccache: Use ccache to cache compilation
+#-- check: Run the check() function if present in the PKGBUILD
+#-- sign: Generate PGP signature file
+#
+BUILDENV=(fakeroot !distcc color !ccache check !sign)
+#-- Specify a directory for package building.
+#BUILDDIR=/tmp/makepkg
+BUILDDIR=/tmp/fvwm-nightshade
+
+#########################################################################
+# GLOBAL PACKAGE OPTIONS
+# These are default values for the options=() settings
+#########################################################################
+#
+# Default: OPTIONS=(strip docs libtool emptydirs zipman purge !upx)
+# A negated option will do the opposite of the comments below.
+#
+#-- strip: Strip symbols from binaries/libraries
+#-- docs: Save doc directories specified by DOC_DIRS
+#-- libtool: Leave libtool (.la) files in packages
+#-- emptydirs: Leave empty directories in packages
+#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
+#-- purge: Remove files specified by PURGE_TARGETS
+#-- upx: Compress binary executable files using UPX
+#
+OPTIONS=(strip docs libtool emptydirs zipman purge !upx)
+
+#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
+INTEGRITY_CHECK=(md5)
+#-- Options to be used when stripping binaries. See `man strip' for details.
+STRIP_BINARIES="--strip-all"
+#-- Options to be used when stripping shared libraries. See `man strip' for details.
+STRIP_SHARED="--strip-unneeded"
+#-- Options to be used when stripping static libraries. See `man strip' for details.
+STRIP_STATIC="--strip-debug"
+#-- Manual (man and info) directories to compress (if zipman is specified)
+MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
+#-- Doc directories to remove (if !docs is specified)
+DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
+#-- Files to be removed from all packages (if purge is specified)
+PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
+
+#########################################################################
+# PACKAGE OUTPUT
+#########################################################################
+#
+# Default: put built package and cached source in build directory
+#
+#-- Destination: specify a fixed directory where all packages will be placed
+PKGDEST=/tmp/fvwm-nightshade
+#-- Source cache: specify a fixed directory where source files will be cached
+SRCDEST=/tmp/fvwm-nightshade
+#-- Source packages: specify a fixed directory where all src packages will be placed
+SRCPKGDEST=/tmp/fvwm-nightshade
+
+#########################################################################
+# EXTENSION DEFAULTS
+#########################################################################
+#
+# WARNING: Do NOT modify these variables unless you know what you are
+# doing.
+#
+PKGEXT='.pkg.tar.xz'
+SRCEXT='.src.tar.gz'
+
+# vim: set ft=sh ts=2 sw=2 et:

0 comments on commit 2afe9c0

Please sign in to comment.