diff -r d775d7289fe4 -r 0ce7093df25f CMakeLists.txt --- a/CMakeLists.txt Mon Apr 27 13:15:23 2009 +0300 +++ b/CMakeLists.txt Tue May 19 00:42:01 2009 +0300 @@ -1,3 +1,18 @@ +## Copyright 2009 Myhailo Danylenko +# This file is part of lua-lm +# +# lua-lm is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . cmake_minimum_required(VERSION 2.6) project(lua-lm C) @@ -22,8 +37,11 @@ set(CPACK_RESOURCE_FILE_README ${lua-lm_SOURCE_DIR}/README) set(CPACK_RESOURCE_FILE_WELCOME ${lua-lm_SOURCE_DIR}/README) set(CPACK_DEBIAN_PACKAGE_SECTION libs) +# XXX: tmp=`tempfile`; obj=${lua-lm_BINARY_DIR}/loudmouth.so; ldd $obj > $tmp; objdump -p $obj | \grep NEEDED | sed -e 's/.*NEEDED *//' | xargs -I "{}" grep -F "{}" $tmp | sed -e 's/.*=> *\(\S*\).*/\1/' | xargs dpkg -S | cut -d : -f 1 | sort -u ; \rm $tmp +# TODO: versions +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libglib2.0-0, liblua5.1-0, libloudmouth1-0") set(CPACK_SOURCE_GENERATOR TBZ2) -set(CPACK_GENERATOR DEB) +set(CPACK_GENERATOR DEB CACHE TEXT "Binary package generator, eg DEB, RPM, TGZ, NSIS...") # FIXME: Detect architecture. How? Though, it anyway produces nonconformant deb names... set(CPACK_SYSTEM_NAME i386) # XXX: Set package name directly to get rid of -Sources?