diff options
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | .hgignore | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | linux/makepkg/PKGBUILD (renamed from linux/makepkg/PKGBUILD.aqua) | 19 | ||||
-rw-r--r-- | linux/makepkg/PKGBUILD.generic | 47 | ||||
-rw-r--r-- | plugins/ProfileEditor/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/forms/aboutdialog.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/version.h.in | 8 | ||||
-rwxr-xr-x | tools/gen_authors.sh | 4 |
10 files changed, 30 insertions, 78 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2d6b408..0000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# build folders -build* - -# QtCreator .pro.user settings -*.user - -# clion -.idea - -# python -__pycache__ diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..5cb74c5 --- /dev/null +++ b/.hgignore @@ -0,0 +1,3 @@ +# clion +cmake-build-* +.idea
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 0586b90..589ccfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ add_subdirectory(plugins/ProfileEditor) # configure a header file to pass version information # if you don't have git, or are building this off the source tarball, define versions in version.h.in -execute_process(COMMAND "git" "describe" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GitDescribe OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND "git" "describe" "--abbrev=0" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GitVersion OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND hg log -r '.' --template={latesttag} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsVersion OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND hg identify --id WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsCommit OUTPUT_STRIP_TRAILING_WHITESPACE) configure_file(src/version.h.in "${PROJECT_BINARY_DIR}/version.h") set(SourceCode @@ -116,4 +116,4 @@ target_link_libraries(poi Qt5::Core Qt5::Widgets Qt5::Concurrent Qt5::WebEngineW target_link_libraries(poi configuration) target_link_libraries(poi bookmarks downloads navigation) -install(TARGETS poi DESTINATION bin CONFIGURATIONS Release) +install(TARGETS poi RUNTIME DESTINATION bin CONFIGURATIONS Release) diff --git a/linux/makepkg/PKGBUILD.aqua b/linux/makepkg/PKGBUILD index 72b8536..95a0a54 100644 --- a/linux/makepkg/PKGBUILD.aqua +++ b/linux/makepkg/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Aqua-sama <aqua@iserlohn-fortress.net> -pkgname=smolbote-git +pkgname=smolbote-hg pkgver=0.0.0 pkgrel=1 pkgdesc='Yet another no-frills browser' @@ -9,10 +9,16 @@ url="https://neueland.iserlohn-fortress.net/smolbote" arch=('x86_64') license=('GPL3') +# -hg replace the old -git package +replaces=('smolbote-git') + depends=('qt5-webengine' 'libconfig') -makedepends=('git' 'cmake' 'pkg-config' 'ninja' 'qt5-webengine' 'libconfig') +makedepends=('mercurial' 'cmake' 'pkg-config' 'ninja' 'qt5-webengine' 'libconfig') -source=("smolbote-git::git+git://neueland.iserlohn-fortress.net/smolbote.git") +# this is the central repository +source=("smolbote-hg::hg+https://neueland.iserlohn-fortress.net/smolbote.hg") +# if you're test building, you want to hg serve your own repo +#source=("smolbote-hg::hg+http://localhost:8000") sha512sums=('SKIP') # any patches go here @@ -20,8 +26,8 @@ sha512sums=('SKIP') #} pkgver() { - cd smolbote-git - echo "$(git describe --long --tags | tr - .)" + cd smolbote-hg + printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)" } build() { @@ -37,6 +43,7 @@ build() { _cmake_options="$_cmake_options -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/local" # compiler + _cmake_options="$_cmake_options -DCMAKE_C_COMPILER=/usr/bin/clang" _cmake_options="$_cmake_options -DCMAKE_CXX_COMPILER=/usr/bin/clang++" # use libc++ instead of libstdc++ @@ -46,7 +53,7 @@ build() { _cmake_options="$_cmake_options -GNinja" # Generate a makefile - cmake $_cmake_options "$srcdir/smolbote-git" + cmake $_cmake_options "$srcdir/smolbote-hg" # build ninja diff --git a/linux/makepkg/PKGBUILD.generic b/linux/makepkg/PKGBUILD.generic deleted file mode 100644 index 98f132f..0000000 --- a/linux/makepkg/PKGBUILD.generic +++ /dev/null @@ -1,47 +0,0 @@ -# Maintainer: Aqua-sama <aqua@iserlohn-fortress.net> - -pkgname=smolbote-git -pkgver=0.0.0 -pkgrel=1 -pkgdesc='Yet another no-frills browser' -url="https://neueland.iserlohn-fortress.net/smolbote" - -arch=('x86_64') -license=('GPL3') - -depends=('qt5-base' 'qt5-webengine') -makedepends=('git' 'cmake' 'libconfig' 'pkg-config') - -source=("smolbote-git::git+git://neueland.iserlohn-fortress.net/smolbote.git") -sha512sums=('SKIP') - -# any patches go here -#prepare() { -#} - -pkgver() { - cd smolbote-git - echo "$(git describe --long --tags | tr - .)" -} - -build() { - rm -rf "$pkgname-$pkgver" - mkdir "$pkgname-$pkgver" - cd "$pkgname-$pkgver" - - # Generate a makefile - # Adjust the install prefix as necessary, default is /usr/local/bin - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local "$srcdir/smolbote-git" - - # Use this if you want to link with libc++ instead - # This requires clang, since gcc doesn't understand the concept of not using libstdc++ - #cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On "$srcdir/smolbote-git" - - # build, with 4 threads - make -} - -package() { - cd "$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install -} diff --git a/plugins/ProfileEditor/CMakeLists.txt b/plugins/ProfileEditor/CMakeLists.txt index ee1af7f..a4a4005 100644 --- a/plugins/ProfileEditor/CMakeLists.txt +++ b/plugins/ProfileEditor/CMakeLists.txt @@ -19,3 +19,5 @@ target_include_directories(ProfileEditorPlugin target_link_libraries(ProfileEditorPlugin PRIVATE Qt5::Widgets PRIVATE Qt5::WebEngineWidgets) + +install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION lib/smolbote CONFIGURATIONS Release) diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp index e5dfc7d..93ee86b 100644 --- a/src/forms/aboutdialog.cpp +++ b/src/forms/aboutdialog.cpp @@ -24,8 +24,8 @@ constexpr const char *getCompiler() inline const QString getLongVersion() { -#ifdef GIT_DESCRIBE - return QString(GIT_DESCRIBE); +#ifdef SMOLBOTE_DESCRIBE + return QString(SMOLBOTE_DESCRIBE); #else return qApp->applicationVersion(); #endif diff --git a/src/main.cpp b/src/main.cpp index ca27783..fb80b7e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -60,8 +60,8 @@ int main(int argc, char *argv[]) { // Create application object Browser instance(argc, argv); -#ifdef GIT_VERSION - instance.setApplicationVersion(GIT_VERSION); +#ifdef SMOLBOTE_VERSION + instance.setApplicationVersion(SMOLBOTE_VERSION); #else instance.setApplicationVersion("1.0.0"); #endif diff --git a/src/version.h.in b/src/version.h.in index bcb28d3..0f597ed 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,9 +1,9 @@ #ifndef VERSION_H #define VERSION_H -// git describe --abbrev=0, 0.2.0 -#define GIT_VERSION "@GitVersion@" -// git describe, 0.2.0-15-g3b2d3c4 -#define GIT_DESCRIBE "@GitDescribe@" +// 0.2.1 +#define SMOLBOTE_VERSION "@VcsVersion@" +// 0.2.1-0fd54a21a551+ +#define SMOLBOTE_DESCRIBE "@VcsVersion@-@VcsCommit@" #endif //VERSION_H diff --git a/tools/gen_authors.sh b/tools/gen_authors.sh index 4f69c76..ed24634 100755 --- a/tools/gen_authors.sh +++ b/tools/gen_authors.sh @@ -15,8 +15,6 @@ # List of aliases # Aqua, Aqua-sama <aqua@iserlohn-fortress.net>, Xian Nox, xiannox <xian.nox@gmail.com> -git log --pretty="format:%an %ae" $1 \ - | sed -e 's/Aqua /Aqua-sama /g'\ - | sed -e 's/Xian Nox xian\.nox@gmail\.com/Aqua-sama aqua@iserlohn-fortress\.net/g'\ +hg log --template='{author}\n' \ | sort | uniq -c | sort -n -r \ | sed -e 's/^ *[0-9]* / /g' |