diff --git a/GNUmakefile b/GNUmakefile index 639576a..04ce9b1 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -115,7 +115,7 @@ distclean: clean rm -f config.h rm -f config.yaml -distdir: config.h +distdir: config.h umask 22 ; mkdir -p '$(distdir)/src/common' umask 22 ; mkdir -p '$(distdir)/src/common/../posix' umask 22 ; mkdir -p '$(distdir)/src/common/../posix/../../include/sys' @@ -133,8 +133,8 @@ distdir: config.h umask 22 ; mkdir -p '$(distdir)/include/sys' umask 22 ; mkdir -p '$(distdir)/test' umask 22 ; mkdir -p '$(distdir)/test/..' + cp -RL libkqueue.spec config.h GNUmakefile kqueue.2 libkqueue.pc.in configure configure.rb LICENSE $(distdir) cp -RL src/common/filter.c src/common/private.h src/common/tree.h src/common/debug.h src/common/knote.c src/common/alloc.h src/common/map.c src/common/kevent.c src/common/kqueue.c $(distdir)/src/common - cp -RL config.h LICENSE GNUmakefile kqueue.2 libkqueue.pc.in configure configure.rb $(distdir) cp -RL src/common/../posix/platform.h $(distdir)/src/common/../posix cp -RL src/common/../posix/../../include/sys/event.h $(distdir)/src/common/../posix/../../include/sys cp -RL src/common/../linux/platform.h $(distdir)/src/common/../linux @@ -197,11 +197,12 @@ libkqueue.so: src/common/filter.o src/common/knote.o src/common/map.o src/common package: clean libkqueue-2.0.tar.gz rm -rf rpm *.rpm mkdir -p rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS - mkdir -p rpm/RPMS/i386 rpm/RPMS/x86_64 + mkdir -p rpm/RPMS/`uname -m` cp libkqueue-2.0.tar.gz rpm/SOURCES - rpmbuild --define "_topdir `pwd`/rpm" -bs libkqueue.spec cp libkqueue.spec rpm/SPECS/libkqueue.spec - rpmbuild --define "_topdir `pwd`/rpm" -bb ./rpm/SPECS/libkqueue.spec + perl -pi -e 's/Version:.*/Version: 2.0/' rpm/SPECS/libkqueue.spec + rpmbuild --define "_topdir `pwd`/rpm" -bs rpm/SPECS/libkqueue.spec + rpmbuild --define "_topdir `pwd`/rpm" -bb rpm/SPECS/libkqueue.spec mv ./rpm/SRPMS/* ./rpm/RPMS/*/*.rpm . rm -rf rpm diff --git a/configure.rb b/configure.rb index 37caf27..b566060 100755 --- a/configure.rb +++ b/configure.rb @@ -192,6 +192,8 @@ project.add(PkgConfig.new( :export_cflags => '-I${includedir}/kqueue' )) +project.packager.add 'libkqueue.spec' + mc = Makeconf.new() mc.configure(project)