An enormous amount of information is currently available through specialized services of digital libraries (DLs). However the specification and development of DLs are very complex tasks if not supported by appropriate models and tools. In this paper, we investigate the use of a formal framework for the modeling and automatic generation of DLs based on the 5S (Streams, Structures, Spaces, Scenarios, and Societies) approach. Using this framework, it is possible to model the several dimensions that make up the DL including: the kinds of multimedia data supported by the DL (stream model), how the information in the DL is organized (structural model), different spatial properties of the DL, including issues of the user interface (spatial model), the many aspects of the DL behavior (scenarios model), and the several communities involved with the DL (societies model). As a case study, we used the BDBComp (Brazilian Digital Library of Computing), under development at the Computer Science Depa...