Enhancement: Fixes #140, Shift as much of the packaging script steps into CMake as possible

This commit is contained in:
Rory Fewell
2023-05-09 02:14:49 +01:00
parent d22078daec
commit 37c8d8fb18
193 changed files with 1266 additions and 1972 deletions

View File

@@ -6,18 +6,10 @@ Within each directory (eg. `luna`) these are the contents:
`res/` - contains the PNG images for each icon, divided into subfolders based on the icon size
`debian-control` - the `control` file used in Debian packaging to provide metadata about the package
`index.theme` - the actual freedesktop theme config file (that gets deployed to `/usr/share/icons`)
`mappings` - since there are lots of Freedesktop icon names that map to the same icon, the mappings file maps those Freedesktop icon names to the icons found under `/res` (formatted as `(freedesktop icon name)-->(icon filename minus extension)`)
## Installation
If you would like to install the icon theme you should:
- `cd` over to the `/packaging/deb/icons` directory
- `./packicon.sh <theme>` (eg. `./packicon.sh luna` to build the Luna icon package)
- `sudo dpkg -i <the package>.deb` (to install the package)
## Developing Icon Themes
All that you need to do to add icons (or change icons is):
- Place your icons in the appropriate directory under `/res`

36
icons/luna/CMakeLists.txt Normal file
View File

@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.0)
project(
wintc-icon-theme-luna
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP icon theme."
)
set(PROJECT_ANYARCH true)
set(PROJECT_FREESTATUS false)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(ICON_THEME_SHORTNAME luna)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/icons/CMakeLists.txt)
include(../../packaging/cmake-inc/mappings/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
wintc_add_mappings_target(icons)
# Configure postinstall script
#
set(PROJECT_POSTINSTALL_SCRIPT ${CMAKE_BINARY_DIR}/postinstall.sh)
configure_file(postinstall.sh ${PROJECT_POSTINSTALL_SCRIPT} @ONLY)
# Installation
#
wintc_configure_and_install_packaging()
install(DIRECTORY ${PROJECT_ROOT}/res DESTINATION ${ICON_PROJECT_INSTALL_PATH})
install(DIRECTORY ${XDG_BLDMAPS_OUTPUT_DIR}/ DESTINATION ${ICON_PROJECT_INSTALL_PATH})
install(FILES ${PROJECT_ROOT}/index.theme DESTINATION ${ICON_PROJECT_INSTALL_PATH})

View File

@@ -1,6 +0,0 @@
Package: icon-theme-luna
Version: 0.0.1
Maintainer: Rory Fewell <roryf@oddmatics.uk>
Architecture: all
Section: non-free
Description: The Windows XP icon theme.

View File

@@ -0,0 +1,3 @@
#!/bin/bash
gtk-update-icon-cache @CMAKE_INSTALL_PREFIX@/share/icons/luna