SET(CMAKE_INSTALL_PREFIX "/")
-#INSTALL_FILES(/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} FILES README COPYING COPYING.lib)
-install(FILES README COPYING COPYING.lib DESTINATION "/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+INSTALL(FILES README
+ COPYING
+ COPYING.lib
+ DESTINATION "/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
# Gen manpage
-INSTALL_FILES(/usr/share/man/man8 FILES createrepo_c.8.gz)
\ No newline at end of file
+INSTALL(FILES createrepo_c.8.gz mergerepo_c.8.gz DESTINATION /usr/share/man/man8)
TARGET_LINK_LIBRARIES(libcreaterepo_c ${LIBXML2_LIBRARIES})
TARGET_LINK_LIBRARIES(libcreaterepo_c ${EXPAT_LIBRARIES})
TARGET_LINK_LIBRARIES(libcreaterepo_c ${CURL_LIBRARY})
-SET_TARGET_PROPERTIES(libcreaterepo_c PROPERTIES OUTPUT_NAME "createrepo_c")
+SET_TARGET_PROPERTIES(libcreaterepo_c PROPERTIES OUTPUT_NAME "createrepo_c-0")
ADD_EXECUTABLE(createrepo_c createrepo_c.c cmd_parser.c)
TARGET_LINK_LIBRARIES(createrepo_c libcreaterepo_c ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES})
# /usr/share/man/man8/createrepo_c.8.gz
-EXPECTED_ARGS=2
+EXPECTED_ARGS=3
if [ $# -ne $EXPECTED_ARGS ]
then
- echo "Usage: `basename $0` <input_file> <outputdir>"
+ echo "Usage: `basename $0` <createrepo_input_file> <mergerepo_input_file> <outputdir>"
echo
- echo "Example: `basename $0` ../src/cmd_parser.c ../doc/"
+ echo "Example: `basename $0` ../src/cmd_parser.c ../src/mergerepo_c.c ../doc/"
exit 1
fi
MY_DIR=`dirname $0`
MY_DIR="$MY_DIR/"
-python $MY_DIR/gen_rst.py $1 | rst2man | gzip > $2/createrepo_c.8.gz
+python $MY_DIR/gen_rst.py $1 | rst2man | gzip > $3/createrepo_c.8.gz
+python $MY_DIR/gen_rst.py $2 --mergerepo | rst2man | gzip > $3/mergerepo_c.8.gz
if __name__ == "__main__":
- parser = OptionParser('usage: %prog [options] <filename>')
- #parser.add_option('-o', '--outputdir', help="...")
+ parser = OptionParser('usage: %prog [options] <filename> [--mergerepo]')
+ parser.add_option('-m', '--mergerepo', action="store_true", help="Gen rst for mergerepo")
options, args = parser.parse_args()
if len(args) < 1:
args = parse_arguments_from_c_file(args[0])
- NAME="createrepo_c"
-
- info = Info(NAME,
+ if not options.mergerepo:
+ NAME = "createrepo_c"
+ info = Info(NAME,
description="C implementation of createrepo",
synopsis="%s [options] <directory>" % (NAME,),
options=args)
+ else:
+ NAME = "mergerepo_c"
+ info = Info(NAME,
+ description="C implementation of mergerepo",
+ synopsis="%s [options] <directory>" % (NAME,),
+ options=args)
+
ret = info.gen_rst()
if not ret:
print >> sys.stderr, "Error: Rst has not been generated"
cp --verbose --parents doc/CMakeLists.txt $DIRECTORY
cp --verbose --parents doc/createrepo_c.8.gz $DIRECTORY
+ cp --verbose --parents doc/mergerepo_c.8.gz $DIRECTORY
cp --verbose --parents src/CMakeLists.txt $DIRECTORY
cp --verbose --parents src/*.c $DIRECTORY