Skip to the content.

← Back to Home

RPM Packaging for SmallTextPad

This guide covers building RPM packages for SmallTextPad, a lightweight Java text editor with encryption and multi-language support.

Files

Prerequisites

System Requirements

Installing Build Dependencies

Fedora/RHEL/CentOS:

sudo dnf install rpm-build rpmdevtools java-21-openjdk-devel

openSUSE:

sudo zypper install rpm-build java-21-openjdk-devel

Building the RPM Package

  1. Navigate to the packaging directory:
    cd packaging
    
  2. Run the build script:
    ./build-rpm.sh
    

The script will:

Package Details

Package Information

Installation Locations

Features Included

Installing the Package

After building, install the package with:

# Using rpm directly
sudo rpm -ivh ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm

# Or using dnf (Fedora/RHEL)
sudo dnf install ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm

# Or using zypper (openSUSE)
sudo zypper install ~/rpmbuild/RPMS/noarch/smalltextpad-1.5.0-1.*.noarch.rpm

Using the Application

Once installed, you can:

  1. Launch from application menu: Look for “SmallTextPad” in the Office or Development category
  2. Launch from command line: smalltextpad [filename]
  3. Open files: Right-click text files and choose “Open with SmallTextPad”

Uninstalling

sudo rpm -e smalltextpad
# or
sudo dnf remove smalltextpad
# or
sudo zypper remove smalltextpad

Customization

Modifying the Spec File

The smalltextpad.spec file can be customized for different requirements:

Building for Different Architectures

While SmallTextPad is a Java application (noarch), you can modify the spec file to build architecture-specific packages if needed by changing:

BuildArch: noarch

Troubleshooting

Common Issues

  1. Java not found during build:
    • Ensure Java 21+ JDK is installed
    • Check that java and javac are in your PATH
  2. RPM build tools missing:
    • Install rpm-build and rpmdevtools packages
  3. Permission errors:
    • Ensure you have write permissions to ~/rpmbuild/
    • The build script will create the directory structure if needed
  4. Missing MANIFEST.MF:
    • The build script automatically creates this file if missing

Build Logs

Check RPM build logs for detailed error information:

tail -f ~/rpmbuild/BUILD/smalltextpad-*/build.log

Contributing

To contribute improvements to the RPM packaging:

  1. Fork the repository
  2. Make changes to the spec file or build scripts
  3. Test the build process
  4. Submit a pull request

Support

See Also